Quantcast
Channel: AutoIt v3 - Developer Chat
Viewing all 750 articles
Browse latest View live

Obfuscator question

$
0
0

When you use obfuscator, it will by default warn if you have Call() function in your script.

I believe that this is because string obfuscation would/could, cause you problems.

Is this because string obfuscation is different to function and variable renaming, and if so, how come Other functions like HotkeySet and Opt are not affected?


Upper case to lower case and vice-versa in c#

$
0
0

Hello,

I am new to this website and trying to learn c#. i want to know the mistake in my coding because when i run the program it doesnt show me anything as an answer, the example of how it should be 

 

the word entered = HeLLO

answer = hEllo

 

public static void Program3()
        {
           
            
 
            string strUserInput;
            System.Console.WriteLine("Please enter a word or a sentence:");
            strUserInput = System.Console.ReadLine();
 
 
            if (strUserInput == "a" || strUserInput == "b" || strUserInput == "c" || strUserInput == "d" || strUserInput == "e" || strUserInput == "f" || strUserInput == "g" || strUserInput == "h" || strUserInput == "i" || strUserInput == "j" || strUserInput == "k" || strUserInput == "l" || strUserInput == "m" || strUserInput == "n" || strUserInput == "o" || strUserInput == "p" || strUserInput == "q" || strUserInput == "r" || strUserInput == "s" || strUserInput == "t" || strUserInput == "u" || strUserInput == "v" || strUserInput == "w" || strUserInput == "x" || strUserInput == "y" || strUserInput == "z")
            {
                strUserInput.ToUpper();
                System.Console.WriteLine(strUserInput.ToLower());
            }
            if (strUserInput == "A" || strUserInput == "B" || strUserInput == "C" || strUserInput == "D" || strUserInput == "E" || strUserInput == "F" || strUserInput == "G" || strUserInput == "H" || strUserInput == "I" || strUserInput == "J" || strUserInput == "K" || strUserInput == "L" || strUserInput == "M" || strUserInput == "N" || strUserInput == "O" || strUserInput == "P" || strUserInput == "Q" || strUserInput == "R" || strUserInput == "S" || strUserInput == "T" || strUserInput == "U" || strUserInput == "V" || strUserInput == "W" || strUserInput == "X" || strUserInput == "Y" || strUserInput == "Z")
            {
                strUserInput.ToLower();
                System.Console.WriteLine(strUserInput.ToUpper());
            }
                       
 
            System.Console.ReadKey();
 
        }
 

VS2010 question

$
0
0

I'm having a problem while I've been trying to set up my GUI windows when debugging a project.

 

I'm moving one window to specific position, and VS2010 Window to another, so I can see both.

 

The goal is to watch the output window as code is running, it's nothing more than a time saving thing having to do it manually.

 

The thing is, when I start debugging and the windows position themselves, the active output tab in VS changes to the tab containing the app entry point.

 

Does anyone know how to prevent this, or programatically activate output tab?

 

It's just simple, so if in debug windows are positioned differently to release.

#if _DEBUG     //manipulate windows #endif

SQLite and transactions

$
0
0

This is here because it's not explicitly an AutoIt question.

 

In my loop some SQL statements are generated, there can be anything between 0 and 20.

I make the SQLite query when broken out of loop.

 

jchd mentioned to me last week about transactions, and I had no idea what they were, but now I do.

 

My question is, how many statements do you think there has to be to warrant encapsulating them in one transaction

as opposed to x amount of single operations?

 

Speed is important to me, but not as much as safety, I want to do as much as is reasonable, to ensure the data is written

while not compromising speed too much.

 

From what I've read, if one single record is not written for some reason, then none are written at all when encapsulating 

statements within a single transaction, that is not at all desirable to me.

 

I have done my search but found virtually nothing about it, so I'm asking here rather than a flock of e-strangers elsewhere.

 

Thanks for reading.

MustDeclareVars=1 as Default

$
0
0

Because i stumbled over scripts again and again, throwing "variable used without being declared" over and over, i suggest MustDeclareVars=1 as default value, to get newbies learning a clean programming-style right from the start.

Tidy Problem: Exit code: -1073741819

$
0
0

Hello,

 

I'm using AutoIT 3.3.8.1 on Windows 7 (x64)

 

The last days I get a strange tidy error. Using Tidy.exe I get a windows notification that the program doesn't work any more ("Tidy your Autoit3 scripts. funktioniert nicht mehr"). In the status area of scite I get the above error message:

"Tidy AutoIt3 v2.3.0.8   Copyright © Jos van der Zande  March 24, 2013"
">Exit code: -1073741819    Time: 95.216"

 

The problem details:

 

Problemsignatur:
  Problemereignisname:    APPCRASH
  Anwendungsname:    Tidy.exe
  Anwendungsversion:    2.3.0.8
  Anwendungszeitstempel:    514f24f8
  Fehlermodulname:    ntdll.dll
  Fehlermodulversion:    6.1.7601.18247
  Fehlermodulzeitstempel:    521ea8e7
  Ausnahmecode:    c0000005
  Ausnahmeoffset:    000332b0
  Betriebsystemversion:    6.1.7601.2.1.0.256.48
  Gebietsschema-ID:    1031
  Zusatzinformation 1:    c7e4
  Zusatzinformation 2:    c7e49971299fe8de6fe308282ae1b48c
  Zusatzinformation 3:    c175
  Zusatzinformation 4:    c175b3d9fe4ae7a1cfb43324294d4f93
 

 

I tried a few tests to locate the problem (using an older version, uninstalling beta, disabling ini-file and used includes etc.) but the error occurs even in a simple Autoit-Script with only a MsgBox-Statement.

 

Can anyone help me or give a hint what the problem is (the error code looks like "access denied" !?)

 

Thanks in advance

kara

SQL query question

$
0
0

I'm trying to use autoIT script to populate database but I bumped on one problem.

 

What I need is query that would check if value in specific field exist (like serial name of product), if it exist than update selected fields or if not insert new value.

 

This is initial query I have made:

"INSERT INTO `Baza1` (`Datum Objave`,`Serija`,`Ime predmeta`,`Broj pregleda`,`cijena`,`Link do oglasa`,`Koeficijent` ) VALUES (" & $datum1 & "," & $serija & ", " & $ime1 & ", " & $pregledBroj1 & ", " & $cijena1 & ", " & $pathlink & ", " & $koeficient & ")"

This query would only insert new data without checking if it already exist.

 

I have tried to use replace query but I simply cannot understand it's format.

I don't know how to select what field to check for duplicate and how to update other fields if criteria is matched.

 

Any explanation or brief part of code example is highly appreciated. Thanks

 

 

Portable-VirtualBox are in need for new developers


Miniscule Mistake in Arrays Wiki

$
0
0

Not a big deal but it does keep the code from running.

 

In the 2nd example for Multi-Dimensional Arrays:

Four-Dim Sample

Local $arr[3][3][3][3] = [_
Local $arr[3][3][3][3] = [_ Local $arr[3][3][3][3] = [_^ ERROR

should be this:

Local $arr[3][3][3][3] = [ _

Excellent resource BTW ;-)

http://www.autoitscript.com/wiki/Arrays

 

cya,

Bill

 

p.s.

Just now found the edit button. Fixed.

 

p.s.s.

Post can be deleted...

Help with ImageSearch.DLL and C#

$
0
0

So I'm trying to port this code from the ImageSearch.Dll into C# and I think I have some type of conversion errors but C# is not catching the unmanaged exception and instead just crashed the program. I'm curious if anyone here can lend me a hand in debugging this. Here is the original Autoit code.

AutoIt         
#include-once ; ------------------------------------------------------------------------------ ; ; AutoIt Version: 3.0 ; Language:       English ; Description:    Functions that assist with Image Search ;                 Require that the ImageSearchDLL.dll be loadable ; ; ------------------------------------------------------------------------------ ;=============================================================================== ; ; Description:      Find the position of an image on the desktop ; Syntax:           _ImageSearchArea, _ImageSearch ; Parameter(s): ;                   $findImage - the image to locate on the desktop ;                   $tolerance - 0 for no tolerance (0-255). Needed when colors of ;                                image differ from desktop. e.g GIF ;                   $resultPosition - Set where the returned x,y location of the image is. ;                                     1 for centre of image, 0 for top left of image ;                   $x $y - Return the x and y location of the image ; ; Return Value(s):  On Success - Returns 1 ;                   On Failure - Returns 0 ; ; Note: Use _ImageSearch to search the entire desktop, _ImageSearchArea to specify ;       a desktop region to search ; ;=============================================================================== Func _ImageSearch($findImage,$resultPosition,ByRef $x, ByRef $y,$tolerance)    return _ImageSearchArea($findImage,$resultPosition,0,0,@DesktopWidth,@DesktopHeight,$x,$y,$tolerance) EndFunc Func _ImageSearchArea($findImage,$resultPosition,$x1,$y1,$right,$bottom,ByRef $x, ByRef $y, $tolerance)     ;MsgBox(0,"asd","" & $x1 & " " & $y1 & " " & $right & " " & $bottom)     if $tolerance>0 then $findImage = "*" & $tolerance & " " & $findImage     $result = DllCall("ImageSearchDLL.dll","str","ImageSearch","int",$x1,"int",$y1,"int",$right,"int",$bottom,"str",$findImage)     ; If error exit     if $result[0]="0" then return 0     ; Otherwise get the x,y location of the match and the size of the image to     ; compute the centre of search     $array = StringSplit($result[0],"|")    $x=Int(Number($array[2]))    $y=Int(Number($array[3]))    if $resultPosition=1 then       $x=$x + Int(Number($array[4])/2)       $y=$y + Int(Number($array[5])/2)    endif    return 1 EndFunc ;=============================================================================== ; ; Description:      Wait for a specified number of seconds for an image to appear ; ; Syntax:           _WaitForImageSearch, _WaitForImagesSearch ; Parameter(s): ;                   $waitSecs  - seconds to try and find the image ;                   $findImage - the image to locate on the desktop ;                   $tolerance - 0 for no tolerance (0-255). Needed when colors of ;                                image differ from desktop. e.g GIF ;                   $resultPosition - Set where the returned x,y location of the image is. ;                                     1 for centre of image, 0 for top left of image ;                   $x $y - Return the x and y location of the image ; ; Return Value(s):  On Success - Returns 1 ;                   On Failure - Returns 0 ; ; ;=============================================================================== Func _WaitForImageSearch($findImage,$waitSecs,$resultPosition,ByRef $x, ByRef $y,$tolerance)     $waitSecs = $waitSecs * 1000     $startTime=TimerInit()     While TimerDiff($startTime) < $waitSecs         sleep(100)         $result=_ImageSearch($findImage,$resultPosition,$x, $y,$tolerance)         if $result > 0 Then             return 1         EndIf     WEnd     return 0 EndFunc ;=============================================================================== ; ; Description:      Wait for a specified number of seconds for any of a set of ;                   images to appear ; ; Syntax:           _WaitForImagesSearch ; Parameter(s): ;                   $waitSecs  - seconds to try and find the image ;                   $findImage - the ARRAY of images to locate on the desktop ;                              - ARRAY[0] is set to the number of images to loop through ;                                ARRAY[1] is the first image ;                   $tolerance - 0 for no tolerance (0-255). Needed when colors of ;                                image differ from desktop. e.g GIF ;                   $resultPosition - Set where the returned x,y location of the image is. ;                                     1 for centre of image, 0 for top left of image ;                   $x $y - Return the x and y location of the image ; ; Return Value(s):  On Success - Returns the index of the successful find ;                   On Failure - Returns 0 ; ; ;=============================================================================== Func _WaitForImagesSearch($findImage,$waitSecs,$resultPosition,ByRef $x, ByRef $y,$tolerance)     $waitSecs = $waitSecs * 1000     $startTime=TimerInit()     While TimerDiff($startTime) < $waitSecs         for $i = 1 to $findImage[0]             sleep(100)             $result=_ImageSearch($findImage[$i],$resultPosition,$x, $y,$tolerance)             if $result > 0 Then                 return $i             EndIf         Next     WEnd     return 0 EndFunc

And here is my c# code. As soon as it tried to call ImageSearch, the program crashes without any exception.

C#         
 [DllImport("ImageSearchDLL.dll")]         static extern string ImageSearch(int aLeft, int aTop, int aRight, int aBottom, string aImageFile);               public static Point _ImageSearch(string findImage, bool resultPosition, int tolerance)         {             int right = Screen.PrimaryScreen.WorkingArea.Right;             int bottom = Screen.PrimaryScreen.WorkingArea.Bottom;                                     return _ImageSearchArea(findImage, resultPosition, 0, 0, right, bottom, tolerance);         }         public static Point _ImageSearchArea(string findImage, bool resultPosition, int x1, int y1, int right, int bottom, int tolerance) {                 new Thread(delegate()                 {                     try                     {                         string result = ImageSearch(x1, y1, right, bottom, "*100" + findImage);                     }                     catch (SEHException sehException)                     {                         int errcode = sehException.ErrorCode;                           throw sehException;                     }                 }).Start();                   Point imagelocation = new Point();                         //imagelocation.X = Convert.ToInt32(arr[2]);             //imagelocation.Y = Convert.ToInt32(arr[3]);            //if (resultPosition)             //{             //    imagelocation.X += Convert.ToInt32(arr[4]) / 2;             //    imagelocation.Y += Convert.ToInt32(arr[5]) / 2;             //}            return imagelocation;         }

Any thoughts on how to catch / debugg the call to imagesearch?

 

oh and here is the original files / dll I'm using.http://http://www.autoitscript.com/forum/index.php?app=core&module=attach&section=attach&attach_id=40653

from this post. http://www.autoitscript.com/forum/topic/65748-image-search-library/page-9

 

AutoIt v3.3.9.22 Beta

$
0
0

File Name: AutoIt v3.3.9.22 Beta

File Submitter: Jon

File Submitted: 05 Nov 2013

File Category: Beta


3.3.9.22 (5th November, 2013) (Beta)
AutoIt:
- Added: @OSVersion WIN_2012R2 support.

- Changed: upx.exe from 3.09 -> 3.91.

- Fixed: Regression with ^ in previous beta.
- Fixed #2461: GUICtrlSetImage() doesn't handle certain types of .gif file.
- Fixed #2167: $WS_EX_LAYOUTRTL and GUICtrlCreateMenu causes bug.
- Fixed #2468: #OnAutoItStartRegister function doc precision.
- Fixed #2315: @OSVersion WIN_2012 support.
- Fixed #2171: TCPTimeout inconsistent.

UDFs:
- Added: _GDIPlus_ParamSize() to handle X64 compatibility.
- Added #2426: TrayConstants.au3 for use with Tray functions. See related function documentation for more details.
- Added: more GDIPlus functions and their respective documentation and example.
- Added #2506: _GUICtrlListView...() doc formating + links.
- Added #2508: doc formating + links

- Changed: _SQLite 3.8.0.0 -> 3.8.1.0.
- Changed: Swapped PixelFormat with Stride parameter for the _GDIPlus_BitmapCreateFromScan0() function.
- Changed: $tagGDIPENCODERPARAMS using $tagGDIPENCODERPARAM.
- Changed: _GDIPlus...() using integer or float for positioning.
- Changed: Modified _ArrayUnique() with a faster version and improved error checking.

- Removed: $tagGDIPPENCODERPARAMS (duplicate of $tagGDIPENCODERPARAMS).
- Removed: _GDIPlus...F() beta functions as they can be handle by corresponding without F.

- Fixed #2460: _StringBetween() $sStart = $sSend.
- Fixed #2459: _StringBetween() doc Description info.
- Fixed #2465: _IEPropertyGet() - out of date links in "ClientInfo Properties".
- Fixed: _GDIPlus_...() functions compatible with X64.
- Fixed #2486: _GUICtrlRichEdit_GetFont() bad multi Font return. Solved also #2485.
- Fixed #2492: _GUIToolbar_... doc example.
- Fixed #2493: _GUIToolbar_Get/SetMetrics() examples.
- Fixed #2494: _GUIToolbar_Get/SetHotItems() examples.


Click here to download this file

Someone has been naughty

$
0
0

This morning, I'm off searching far and wide for a specific application...

And I'm starting to jump into sites with Chinese and Arabic fonts, and sites with .pl and .ru suffixes.

I'm know I'm tempting fate. I do have my "panic button" next to the clock that switches me to a basic startup profile (via msconfig), launches rkill.exe, and disables the internet.

Half the time I'm able to clean the garbage off without a reboot. Some of the ransomware infects faster than my guards go up, but my default user account is not an administrator, and coming back in as Administrator has worked with all of the fake FBI crap.  Worst case scenario, I just pull the drive and hang it off another PC as the D: drive and give it a cleaning.

 

Anyway, I was loading some site, there's a freeze, then boom, Firefox windows start popping up like crazy.  I killed the whole browser group, disabled my Local Area Connection and started looking around.  Looking at running processes "winvnc86.exe" has red flags all over it as I've become very familiar with what belongs in the process list. I killed winvnc86 and things seeming safe enabled my connection, , started updating combofix and malwarebytes to their latest versions and then googled the winvnc86 filename.  I clicked on the first few relevant sites to open in separate tabs and then my pc slowed, I got redirected, popups started again.

 

I locked up and ran the cleaning programs.  The popups were due to a couple executables stuck in my "user/local settings/temp" folder, and my 14KB svchost.exe had blossomed to 300KB.

It's the other virus that caught my eye, a fairly new variant I guess. It's the one with the winvnc86.exe process, and it had downloaded 3 files to my system32 folder and was getting me setup to mine for bitcoin or litecoin.  What I found interesting was that the driver/installer for it all, that had been parked in my "startup" folder, was a bound Autoit 3.3.8.1 executable, 571KB in size, called initsrv.exe. 

It's actions are well-described here: http://www.tgsoft.it/english/news_archivio_eng.asp?id=562

I found it a wierd mix of both shock and amusement that something malicious, with such an origin, would ever find it's way to my desktop.

Attached Thumbnails

  • Region Capture.jpg

EtherNet/IP librarie

$
0
0

I'm looking for a librarie that is build for communication EtherNet/IP protocol.

That's great if you can share with me your scripts or your DLL. Thanks.

DllCall for C++

$
0
0

Hey! Currently i'am trying to programm a funktion like DllCall for C++. Do you got any tricks how to handle the specification of the variables as string?

 

sample:

DllCall("Dllname", "ReturnType", "FunctionName", "float", $fHeight, "float", $fWidth)

 

Currently i have to programm for every funtion that i want to include something like this:

HRESULT URLDownloadToFileA(LPUNKNOWN pCaller,LPCSTR szURL,LPCSTR szFileName, DWORD dwReserved,LPBINDSTATUSCALLBACK lpfnCB) {    typedef HRESULT (P_OT)(LPUNKNOWN, LPCSTR, LPCSTR,DWORD,LPBINDSTATUSCALLBACK);    P_OT* OT;    HMODULE hLib;    hLib = LoadLibraryA("Urlmon.dll");    if(hLib)    {       OT = (P_OT*)GetProcAddress(hLib, "URLDownloadToFileA");       if(OT)          return OT(pCaller,szURL,szFileName, dwReserved,lpfnCB);       else          return NULL;    }    else       return NULL; }

Latest Autoit Source


Run function not handling spaces when using 'Start'

$
0
0

Hi everyone,

 

got a little project here. I intend of writting all the files to an array using '_FileListToArray' so i can filter just the files i want.

 

Then ill open them one at a time using 'run' however -

 

the 'Start' command will not handle spaces in the filenames - i've tried lots of things here to get around it.

 

I started with the entire path -

$stringPath = "C:\Documents and Settings\joconno2\My Documents\UTStudioScriptingProject\TestInputFolder\THICKNESS _ PIMM_3058 3062.utdata" MsgBox ( 0, "Checking string", $stringPath) $ProgramCall = Run(@ComSpec & " /c " & 'Start' & $stringPath) If 0 == $ProgramCall Then     MsgBox (262144, "Failed", "Failed to load veo software") EndIf

and it tells me C:\Documents" cannot be found - fair enough i think :-)

 

so i looked at how to get around the spaces,

$stringPath = "C:\Documents and Settings\joconno2\My Documents\UTStudioScriptingProject\TestInputFolder\" $filename = "THICKNESS _ PIMM_3058 3062.utdata" MsgBox ( 0, "Checking string", $stringPath) $ProgramCall = Run(@ComSpec & " /c " & 'Start' & $filename , $stringPath, @SW_HIDE)

and still no luck, it says it cannot find "THICKNESS" - which really is an iteration of my first concern

 

and if I can it will be massively helpful to use the spaces in the file name, becasue the equipment we use that makes the .utdata files is best used by making file names with spaces.

 

Cheers Everyone

 

Joey

Inconsistent behavior with @scriptdir

$
0
0

While working on a script I noticed that @scriptdir does not have a tailing \ when used normally, but does when placed in the root of a drive. A simple script to demonstrate this problem

ConsoleWrite(@scriptdir&"\test.txt"&@CRLF) FileWrite(@ScriptDir&"\test.txt", "Hello world!") Exit

When in a subfolder, the path is as expected (C:\somefolder becoming C:\somefolder\test.txt). There is no trailing \. But when placed in the root of a drive, the path becomes C:\, resulting in file path of C:\\test.txt. While some programs and functions will succeed with this, this path is invalid and causes issues with other programs. I have to do something like stringreplace( @scriptdir&"\test.txt", "\\", "\") to clean up an issue that shouldn't be happening

 

Is this behavior intentional?

Source Code of AutoIt

$
0
0

These are more of informational questions... In which programming language is AutoIt mostly written? also AutoIt used to be open source for a while which is not the case nowadays, why is that?

New SciTE4AutoIt3 available with SciTE v3.3.6

$
0
0

11/14/2013: Uploaded a new SciTE4AutoIt3.exe installer with the new SciTE v3.3.6 release.

There are a couple of major changes:
- Updated our version of SciTE from 3.2.0 to 3.3.6
- Added support for the new Beta 3.3.9.x syntax to most utilities.

Enjoy,
Jos


Addition/Changes/Fixes in the current installer:

Plain Text         
-------------------------------------------------------------------------------------------------- 11/14/2013 *** Merged the updates of SciTE v 3.3.6 by Neil Hodgson with our own version of SciTE. (Jos)     - Added check to avoid double shelling of the script via shortcuts of the tools menu items.     - Added Properties option to set the default encoding of new files:         NewFileEncoding=CodePage/UTF8/UTF8BOM/UTF16BE/UTF16LE     - Fixed issue in AU3 lexer to show the last correctly when the previous line is a commentline, commentblock, Special and Directives. *** Updated AutoIt3Wrapper v2.1.3.0 (Jos)     - Fixed issue where a tempfile was left behind when files was checked by au3check and UTF encoded.     - Added support for the #PRAGMA statement to avoid any conflicts. Warnings are now displayed in the Console output.     - Added SciTE version to the displayed info in the Console Output.     - Added #AutoIt3Wrapper_Res_Remove (wraithdu)     - Added File compression for Resource Files (wraithdu)         #AutoIt3Wrapper_Res_File_Add=%in%, 10, UNCOMPRESSED         #AutoIt3Wrapper_Res_File_Add=%in%, -10, COMPRESSED     - Updated option to change the TempDir in the INI file. Default changed to @UserProfileDir. (wraithdu)     - Fixed adding /Beta to the Obfuscator line when using the /Beta on the commandline of Autoit3wrapper.     - Fixed to ensure UPX is ran when needed.     - Fixed: Allow | in run_before and Run_After directives. *** Updated Tidy v2.4.0.0 (Jos)     - Added support for 3.3.9.x changes.     - Changed default EOF setting to add the CRLF. (End_With_NewLine=1)     - Fixed removal of spaces for new Var/Func notation     - Fixed crash caused by Function table load. *** Updated SciTEConfig v1.6.11.0     - Updates for Abbrev manager and User Calltip Manager (Melba23) *** Updated Obfuscator.exe v1.0.31.0 (Jos)     - Fixed ensure #pragma statements are not stripped.     - Fixed Regression internal code cleanup done before. The Obfuscation was broken     - Fixed #include logic for #Include not first checking the Directory where the file containing the include is located.     - Added check for max 4100 character record len without causing a crash. *** Added support for personal LUA functions. Look at "PersonalTools.lua" in your @UserProfileDir subdir for details. *** Updated SciTEJump to the latest version v2.13.103.227 (guinness) --------------------------------------------------------------------------------------------------

==> ScitillaHistory page containing all SciTE/Scintilla updates.
==> Visit the SciTE4AutoIt3 Download page for the latest versions
==> Check the online documentation for an overview of all extra's you get with this installer.
 

Issues running a DOS copy command

$
0
0

I am having problems running the DOS copy command from within a script. Ultimately, I want to combine the cotents of files A and B into file C.  This snippet only shows one file being copied which could be done with the filecopy function.  Since I have to combine two different files into one I thought I could use the DOS copy command with the following syntax

 

copy "A"+"B" "C"

 

I could not get that to work with the run command, runwait, shellexecute etc. so I simplifed the command to get the to work with only one file figuring that I could add the second file once the syntax was correct.

 

Code as follows

 

$cmd = @ComSpec & ' /c copy ' & '"' & $Tmp_EmpFileFullFN & '" "' & $EmpFileFullFN & '"'
$RStat = Run($cmd, "",  @SW_MAXIMIZE)

ConsoleWrite($cmd & " (" & $RStat & ") (" & @error & ")")

 

Output from the consolewrite command

 

C:\WINDOWS\cmd.exe /c copy "C:\temp\employee\employee.csv.tmp" "C:\temp\employee\employee.csv"

 

both the $RStat and @error return a zero value.  All of the commands from above appear to return a non-zero value if successful.  When I look at the temp folder the employee.csv is not created.

 

Can anyone point me in the right direction?

Viewing all 750 articles
Browse latest View live