Search found 1346 matches

by Dorian (MJT support)
Sun Aug 13, 2023 3:07 pm
Forum: Technical / Scripting
Topic: CTRL-SPACE as a hotkey for a script
Replies: 1
Views: 4667

Re: CTRL-SPACE as a hotkey for a script

CTRL-SPACE is not an option for a hotkey. If you're looking to detect it as an Onevent, the code below will do that :

Code: Select all

OnEvent>KEY_DOWN,VK32,2,KeyPress

//keep the script running
label>loop
wait>0.1
goto>loop


SRT>KeyPress
  MDL>CTRL+Space was pressed
END>KeyPress
by Dorian (MJT support)
Fri Aug 11, 2023 8:06 am
Forum: Technical / Scripting
Topic: Having troubles with colors changing for GPC
Replies: 4
Views: 5487

Re: Having troubles with colors changing for GPC

Thank you for the update. I'm sure that will help others.
by Dorian (MJT support)
Sun Aug 06, 2023 2:28 pm
Forum: Technical / Scripting
Topic: Having troubles with colors changing for GPC
Replies: 4
Views: 5487

Re: Having troubles with colors changing for GPC

If I try getPixelColor on two different laptops on the same image (I used the blue button on the MJT homepage) I get two different value too. This is somewhat to be expected unless each PC has identical colour profiles, graphics settings, any calibration is identical, and you have identical hardware...
by Dorian (MJT support)
Wed Aug 02, 2023 5:01 pm
Forum: Beginners
Topic: Executing Multiple macros
Replies: 5
Views: 6158

Re: Executing Multiple macros

If you're passing 2, but the first line of the macro you're running set it to 1, then it will use 1. That makes perfect sense if you think about it. You can simply comment out (or remove) line 1 in ITEMNUM.scp

Code: Select all

//Let>ITEMNUM=1
by Dorian (MJT support)
Wed Aug 02, 2023 7:04 am
Forum: Beginners
Topic: Executing Multiple macros
Replies: 5
Views: 6158

Re: Executing Multiple macros

It shouldn't matter if they are recorded. It's the path. It's looking in the Program folder instead of the data folder. Try this (edit if you've put the script somewhere else). Macro>%SCRIPT_DIR%\MyScript.scp Also you don't have to go to the trouble of screenshots to post code. You can use the butto...
by Dorian (MJT support)
Tue Aug 01, 2023 4:44 pm
Forum: Technical / Scripting
Topic: Having Trouble Extracting from a site using Chrome Functions...
Replies: 6
Views: 6106

Re: Having Trouble Extracting from a site using Chrome Functions...

Hover over the element you want, right-click n (inspect), then do it a second time as it often does not select the correct part of the code. Once Developer Tools opens up you can also press CTRL-SHIFT-C - then see what happens when you hover of any page elements. Just as food for thought, below is t...
by Dorian (MJT support)
Tue Aug 01, 2023 9:36 am
Forum: Technical / Scripting
Topic: Having Trouble Extracting from a site using Chrome Functions...
Replies: 6
Views: 6106

Re: Having Trouble Extracting from a site using Chrome Functions...

The trick was to get the entire job panel. There are 15 of them so you should see 15 results. From this : < td class =" resultContent "><div class="css-1m4cuuf e37uo190"><h2 class="jobTitle css-1h4a4n5 eu4oa1w0" tabindex="-1"> We get: ChromeFindElements>session_id,xpath,// td [@ class =' resultConte...
by Dorian (MJT support)
Mon Jul 31, 2023 8:53 am
Forum: Technical / Scripting
Topic: Compiled Script Logging?
Replies: 11
Views: 19630

Re: Compiled Script Logging?

Just after I hit submit it occurred to me that if you wanted to delete that logfile after running, you could put this at the end of your script :

Code: Select all

If>writelogfile=False
Deletefile>D:\mondaylogINI.log
Endif
by Dorian (MJT support)
Mon Jul 31, 2023 8:48 am
Forum: Technical / Scripting
Topic: Compiled Script Logging?
Replies: 11
Views: 19630

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

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

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

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

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

Re: Not Sure Why This Doesn't Work

Is the app running as admin? If so Macro Scheduler needs to as well.
Sign up to our newsletter for free automation tips, tricks & discounts