Search found 1352 matches

by Dorian (MJT support)
Mon Jul 31, 2023 8:48 am
Forum: Technical / Scripting
Topic: Compiled Script Logging?
Replies: 11
Views: 20195

Re: Compiled Script Logging?

Apologies for this being a little long-winded. It's my MO to always try and be as thorough as possible. If you've already successfully logged compiled scripts then we're part way there. The script needs a log file set, and that's something you're already familiar with. A logfile will still be genera...
by Dorian (MJT support)
Sun Jul 30, 2023 9:35 pm
Forum: Technical / Scripting
Topic: Compiled Script Logging?
Replies: 11
Views: 20195

Re: Compiled Script Logging?

When compiling, put this in the "Include Parameters" box at the bottom :

Code: Select all

LOGFILE=%SCRIPT_DIR%\support.log
However, I am finding that let>_write_log_file=0 is not preventing the logfile being created, so I'll be looking in to that.
by Dorian (MJT support)
Thu Jul 27, 2023 5:37 pm
Forum: Beginners
Topic: Executing Multiple macros
Replies: 5
Views: 6532

Re: Executing Multiple macros

This answers your question regarding running from the command line and passing variables. Of course you can also have a script which uses the Macro command to call multiple scripts in a row. I have just answered a very similar question to this via tech support, so will leave the text question for t...
by Dorian (MJT support)
Sun Jul 23, 2023 6:18 pm
Forum: Technical / Scripting
Topic: Select Random image from Computer Folder to upload to Social Media
Replies: 6
Views: 6540

Re: Select Random image from Computer Folder to upload to Social Media

It's demonstrating in principle how it gets a list of files from a folder, and then chooses one of them at random.

What you do with with that once it's chosen isn't nearly as simple. The answer would be different (and likely to be quite the can of worms) for each and every social media site.
by Dorian (MJT support)
Sun Jul 23, 2023 5:46 pm
Forum: Technical / Scripting
Topic: Select Random image from Computer Folder to upload to Social Media
Replies: 6
Views: 6540

Re: Select Random image from Computer Folder to upload to Social Media

First you can get all the files in a folder using GetFileList. Then select one of the results randomly by using Random. The code below would find all png files in the given folder. You will see I have purposely cannibalised the examples given at GetFileList and Random to make things easier to follow...
by Dorian (MJT support)
Wed Jul 19, 2023 2:12 pm
Forum: Beginners
Topic: Not Sure Why This Doesn't Work
Replies: 2
Views: 5427

Re: Not Sure Why This Doesn't Work

Is the app running as admin? If so Macro Scheduler needs to as well.
by Dorian (MJT support)
Wed Jul 19, 2023 2:04 pm
Forum: Technical / Scripting
Topic: Errors
Replies: 1
Views: 4905

Re: Errors

This is uaually a permissions problem, or you have some security software blocking the macro recorder. To check the permissions problem- what happens if you manually create a new macro in the same group you are trying to record into? File/New and then just type some random text, then save and give i...
by Dorian (MJT support)
Tue Jul 18, 2023 11:01 am
Forum: Technical / Scripting
Topic: Having trouble installing ChromeDriver
Replies: 1
Views: 4924

Re: Having trouble installing ChromeDriver

ChromeDriver 114.0.5735.90 should be fine for Chrome 114.0.5735.199. Those are the same versions I'm using. It sounds like you may have downloaded the wrong zip. Go here (which you access from here ) and download chromedriver_win32.zip. That zipfile should contain chromedriver.exe. That's the file y...
by Dorian (MJT support)
Fri Jul 14, 2023 9:44 am
Forum: Technical / Scripting
Topic: Grrr I know this is pain but...
Replies: 6
Views: 10608

Re: Grrr I know this is pain but...

Does the last reply on this thread help?

viewtopic.php?f=1&t=10673
by Dorian (MJT support)
Mon Jul 03, 2023 9:04 am
Forum: Technical / Scripting
Topic: Accessing Array elements
Replies: 11
Views: 10380

Re: Accessing Array elements

I think hagchr is on the right track there. This works : Let>msFileNameCurrPageNr=d:\00000\ProjectAbc.txt CSVFileToArray>msFileNameCurrPageNr,msArrCurrPagePath Let>msArrCurrPageSize=3 Let>msArrCurrPageRowLast=msArrCurrPagePath_%msArrCurrPageSize%_0 This doesn't. Let>msFileNameCurrPageNr=d:\00000\Pro...
by Dorian (MJT support)
Mon Jul 03, 2023 8:48 am
Forum: Beginners
Topic: Difficulty capturing data from HTML elements
Replies: 7
Views: 6798

Re: Difficulty capturing data from HTML elements

While my first example would have returned 5 data-it="card" results, it was not specifically looking for it as a child of id="q". This one does EdgeFindElements>session_id,xpath,//div[@id='q']/div[@data-it='card'],el So : let>TheURL=D:/vinipinho14.htm Let>EDGEDRIVER_EXE=d:\msedgedriver.exe EdgeStart...
by Dorian (MJT support)
Sun Jul 02, 2023 10:32 pm
Forum: Beginners
Topic: Difficulty capturing data from HTML elements
Replies: 7
Views: 6798

Re: Difficulty capturing data from HTML elements

My first method got them individually.
by Dorian (MJT support)
Sun Jul 02, 2023 2:53 pm
Forum: Beginners
Topic: Difficulty capturing data from HTML elements
Replies: 7
Views: 6798

Re: Difficulty capturing data from HTML elements

I have edited your html as you were missing the = after data-it on some of the lines. Here are a couple of ways you can do this : let>TheURL=D:/vinipinho14.htm Let>EDGEDRIVER_EXE=d:\msedgedriver.exe EdgeStart>session_id EdgeNavigate>session_id,url,%TheURL% //Extract each div[@data-it='card' EdgeFind...
by Dorian (MJT support)
Fri Jun 30, 2023 1:33 pm
Forum: Technical / Scripting
Topic: Sporadic bug in date or string function
Replies: 4
Views: 5614

Re: Sporadic bug in date or string function

No problem. Thank you for clarifying.
Sign up to our newsletter for free automation tips, tricks & discounts