Search found 3230 matches

by JRL
Thu Oct 10, 2019 9:38 pm
Forum: Technical / Scripting
Topic: Having issues with RunProgram
Replies: 6
Views: 71

Re: Having issues with RunProgram

I think there's something weird about "pdinfo.exe". I think the message "The filename, directory name, or volume label syntax is incorrect." is being generated by "pdinfo.exe". To help your sanity, the program is not following the rules. Made me crazy too. In any case I got it to work WITH spaces in...
by JRL
Thu Oct 10, 2019 8:21 pm
Forum: Technical / Scripting
Topic: Having issues with RunProgram
Replies: 6
Views: 71

Re: Having issues with RunProgram

My experience with spaces in paths and file names has been that RunProgram> and ExecuteFile> do not need quotes. If you use RunProgram> with a cmd you do need quotes around paths and names with spaces in them.
by JRL
Thu Oct 10, 2019 7:43 pm
Forum: Technical / Scripting
Topic: Having issues with RunProgram
Replies: 6
Views: 71

Re: Having issues with RunProgram

Hi Keith,

I'd try a "cmd /k" to be able to see what fails. The "/k" will leave the DOS box open.

RunProgram>cmd /k "c:\temp\pdfinfo.exe" "c:\temp\test.pdf"|find "Pages:" > "c:\temp\numpages.txt"
by JRL
Mon Oct 07, 2019 1:52 pm
Forum: Technical / Scripting
Topic: Logging scripts makes it slow. Need an alternative
Replies: 4
Views: 91

Re: Logging scripts makes it slow. Need an alternative

Another possible method is the to use the "_WRITE_LOG_FILE" system variable. When it is set to "0" logging is suspended until you reset it back to "1". If the script always fails in the same place or places, those may be the only places that need to be logged. Let>_WRITE_LOG_FILE=0 //Lines of code n...
by JRL
Wed Oct 02, 2019 8:14 pm
Forum: Technical / Scripting
Topic: extracting values from a text file
Replies: 1
Views: 47

Re: extracting values from a text file

I'd try Marcus' Most Used Regex . To parse. Then you use the produced array of data any way you'd like. Let>vData=[{"Landmark_Style":"Customer Site","idLandmark":75705,"idCustomer":153,"idLandmark_Style":8,"Landmark_Category":1,"Created_On":"2019-10-01T20:38:29.357","Created_By":2772, //Use Marcus' ...
by JRL
Wed Oct 02, 2019 7:20 pm
Forum: General Discussion
Topic: everyday logon and print
Replies: 3
Views: 94

Re: everyday logon and print

Hi timle, Though its true that UI events can't be performed while your screen is locked, non-UI events can. If you can find a way to print your documents from a command line they can be printed while the screen is locked. To demonstrate, the following script will lock your screen and print a test do...
by JRL
Fri Sep 27, 2019 8:31 pm
Forum: Scripts and Tips
Topic: Parameters in the File Name
Replies: 0
Views: 150

Parameters in the File Name

I have a script that runs daily and every now and then I need to alter how far back it looks within a group of files. I could just hard code the value and alter the script when I need to but in this case the file is compiled so I'd need to recompile each time I made a change. Could also use the stan...
by JRL
Fri Sep 13, 2019 1:15 pm
Forum: Technical / Scripting
Topic: Stepping Through An Array
Replies: 2
Views: 125

Re: Stepping Through An Array

Hi Cy. Welcome back! I don't have time to test but this should be close and you'll understand the concept. //Find and Left Click Center of FindImagePos>%BMP_DIR%\image_10.bmp,%TEMP_DIR%\screenrect.bmp,0.7,1,DashXArr,DashYArr,DashNumFound,EXACT If>NumFound>0 Let>kk=-1 Repeat>kk Add>kk,1 Let>XMove=Das...
by JRL
Thu Aug 29, 2019 7:06 pm
Forum: Scripts and Tips
Topic: Mouse Click Detector - Bug
Replies: 1
Views: 201

Re: Mouse Click Detector - Bug

Code: Select all

OnEvent>Key_Down,VK01,0,srtClick
Let>Keystate=0

Label>Loop
Wait>0.04
If>keystate<>0
Let>Keystate=0
Message>Great answer
Wait>0.35
PushButton>Macro Scheduler Message,&OK
Wait>.6
Goto>Postloop
endif
Goto>Loop
Label>Postloop


SRT>srtClick
  Let>keystate=1
END>srtClick
by JRL
Mon Aug 19, 2019 5:09 pm
Forum: Technical / Scripting
Topic: I am running a script in the macro scheduler... and need a daily time check
Replies: 6
Views: 498

Re: I am running a script in the macro scheduler... and need a daily time check

One more

Code: Select all

OnEvent>Time,0935,,RunDifferentLineOfCode

Label>RunLinesOfIrrelevantCode
  Wait>1
Goto>RunLinesOfIrrelevantCode

SRT>RunDifferentLineOfCode
  MDL>Its 9:35 am.%crlf%Now we wait a minute else we'd just keep running this Sub over and over until 9:36 am
  Wait>61
END>RunDifferentLineOfCode
by JRL
Tue Aug 13, 2019 12:48 pm
Forum: Technical / Scripting
Topic: Running an executable, Screen Resolution for Multiple Monitors
Replies: 12
Views: 408

Re: Running an executable, Screen Resolution for Multiple Monitors

Hello Dorian, Assuming you have a windows 10 computer, what do you see if you right click the desktop and select "Display Settings" from the menu? You should see representations of both monitors (1 and 2) and if you scroll down you will find what Windows reports as the resolution of the selected mon...
by JRL
Mon Aug 12, 2019 6:37 pm
Forum: Technical / Scripting
Topic: Running an executable, Screen Resolution for Multiple Monitors
Replies: 12
Views: 408

Re: Running an executable, Screen Resolution for Multiple Monitors

Well done jbas! I watched this thread with interest not commenting because I don't like the solutions I've used for multiple monitor resolution acquisition. This powershell solution is spectacular! I did make a small alteration for timing. I removed your Wait>10 and added an RP_Wait>1 to cause Macro...
by JRL
Fri Jul 26, 2019 3:20 pm
Forum: Technical / Scripting
Topic: FTP Mode -why no automatic option
Replies: 2
Views: 141

Re: FTP Mode -why no automatic option

Unless you are moving Windows text files to be viewed on a UNIX machine, just use binary. Binary does not modify the file, ASCII might.

Google "FTP binary vs ascii" for millions of explanations.
by JRL
Fri Jul 05, 2019 7:59 pm
Forum: Technical / Scripting
Topic: Rename File Trouble
Replies: 10
Views: 381

Re: Rename File Trouble

Sorry. I fixed the original posted code. The left bracket for the closing "code" html got deleted. The code I posted also partially uses VBScript to convert each character in the string to its corresponding ASCII decimal value. The character """ (double quote) does not pass well to VBScript without ...