Search found 3238 matches

by JRL
Tue Nov 19, 2019 6:11 pm
Forum: Technical / Scripting
Topic: Create Column in Excel
Replies: 1
Views: 6

Re: Create Column in Excel

Found an answer HERE VBStart Const xlToRight = -4161 Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True Set objWB = objExcel.Workbooks.Open("I:\dick\TableTabFiles\Router_Lines_Used_Since_2018.xlsx") Set objSheet = objwb.Sheets("Sheet1") objSheet.Columns("D:D").Insert xlToRight ...
by JRL
Tue Nov 19, 2019 5:36 pm
Forum: Technical / Scripting
Topic: Create Column in Excel
Replies: 1
Views: 6

Create Column in Excel

Does anyone have a method to insert a column into an existing Excel worksheet? I am looking to see if VBScript can do this but if someone already has a way I'd appreciate hearing about it. For example: I want to insert a column after C and call it "Area" Before A B C D E Length Width Height Error Ph...
by JRL
Tue Nov 05, 2019 8:58 pm
Forum: General Discussion
Topic: GEt day of week from date string
Replies: 3
Views: 327

Re: GEt day of week from date string

I don't know. Though in today's world and with Macro Scheduler's capabilities you'd probably be better off putting your efforts into learning Python rather than the antiquated VBScript. I usually search for code snippets that are close to what I want then alter them to try to accomplish my goal. A l...
by JRL
Tue Nov 05, 2019 2:13 am
Forum: General Discussion
Topic: GEt day of week from date string
Replies: 3
Views: 327

Re: Get day of week from date string

Code: Select all

VBEval>WeekdayName(Weekday("2019-10-30",0)),vDayoftheWeek
MDL>vDayoftheWeek
by JRL
Thu Oct 31, 2019 1:37 pm
Forum: Technical / Scripting
Topic: List files with exclusion
Replies: 6
Views: 244

Re: List files with exclusion

Perhaps a symbol of anarchy? A dot hidden between the lines of code to remind the proletariat to stay strong? OR, way more likely, a way to provide white space in the code since the (code) (/code) html function removes blank lines.
by JRL
Wed Oct 30, 2019 12:37 pm
Forum: Technical / Scripting
Topic: List files with exclusion
Replies: 6
Views: 244

Re: List files with exclusion

Just add another "find". Type "DOS find" into your favorite search engine for more info.

Code: Select all

Let>vPath=%userdocuments_dir%\PDF_Files
.
Let>RP_Wait=1
Let>RP_Windowmode=0
RunProgram>cmd /c dir "%vPath%\*.*" | find /V /I "_x" | find /V /I "_y" | clip
GetClipboard>vData
MDL>vData
by JRL
Tue Oct 29, 2019 10:00 pm
Forum: Technical / Scripting
Topic: List files with exclusion
Replies: 6
Views: 244

Re: List files with exclusion

This help?

Code: Select all

Let>vPath=%userdocuments_dir%\PDF_Files
.
Let>RP_Wait=1
Let>RP_Windowmode=0
RunProgram>cmd /c dir "%vPath%\*.*" | find /V /I "_x" | clip
GetClipboard>vData
MDL>vData
by JRL
Thu Oct 24, 2019 5:17 am
Forum: Enhancement Suggestions
Topic: Trigonometric functions
Replies: 2
Views: 503

Re: Trigonometric functions

Could just create subroutines for each trig function you want to use. These three usually get me by. You might have to set the function result to a variable then use the variable in your formula similar to the way the result variables are used in the ending message below. input>Angle,Angle in Degree...
by JRL
Thu Oct 10, 2019 9:38 pm
Forum: Technical / Scripting
Topic: Having issues with RunProgram
Replies: 6
Views: 147

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: 147

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: 147

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: 173

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: 87

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: 141

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: 810

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...