Search found 1351 matches

by Dorian (MJT support)
Wed Aug 05, 2020 2:10 pm
Forum: Technical / Scripting
Topic: Issue with MouseMoveRel and Seperate
Replies: 4
Views: 5953

Re: Issue with MouseMoveRel and Seperate

I think you still have control characters at the end of the line, and they're being included with Y. So Y is not a number, as it probably includes the linefeed. Rtrim fixes this. ReadFile>G:\rfu.txt,sVals MessageModal>sVals Separate>sVals,LF,valList If>valList_count>0 Let>k=0 Repeat>k Let>k=k+1 Let>...
by Dorian (MJT support)
Tue Aug 04, 2020 1:26 pm
Forum: Technical / Scripting
Topic: OnEvent>KEY_UP
Replies: 4
Views: 5578

Re: OnEvent>KEY_UP

If you're looking to turn it off - to quote the help file for OnEvent : To disable an event handler call OnEvent again with the same parameters but instead of the subroutine name issue an empty string. E.g.: //enable OnEvent>KEY_DOWN,VK32,0,KeyPress ... ... //disable it OnEvent>KEY_DOWN,VK32,0, .. ....
by Dorian (MJT support)
Tue Aug 04, 2020 10:14 am
Forum: Technical / Scripting
Topic: Clipboard problem in string with "%" character
Replies: 1
Views: 3170

Re: Clipboard problem in string with "%" character

I can't seem to replicate that, whether I use Macro Scheduler to place "%s\n cannot be &edited." onto the clipboard or whether I do it manually. The MessageModal always seems to be %s\n cannot be &edited.

Code: Select all

Putclipboard>%s\n cannot be &edited.
GetClipBoard>TheClip
messagemodal>%TheClip%
by Dorian (MJT support)
Tue Aug 04, 2020 9:46 am
Forum: Beginners
Topic: Can't set focus in new popup chrome window using "setFocus"
Replies: 6
Views: 6560

Re: Can't set focus in new popup chrome window using "setFocus"

You shouldn't need to set focus if you use OCRWindow for your OCR. You should be able to get the window title with GetActiveWindow. //Uncomment this if the popup is a child window //Let>GAW_TYPE=1 GetActiveWindow>WinTitle,XX,YY,WW,HH //If you wish, you can now set focus SetFocus>%WinTitle% OCRWindow...
by Dorian (MJT support)
Mon Aug 03, 2020 1:05 pm
Forum: Technical / Scripting
Topic: Cannot recognize the correct image
Replies: 4
Views: 7120

Re: Cannot recognize the correct image

Do you know for sure it's jumping to that subroutine? Try turning logging on to to make sure it's actually looking for that image in the first place. If it isn't, that will explain why it'll find it when you debug that isolated part of the script, but doesn't when you run the whole thing.
by Dorian (MJT support)
Mon Aug 03, 2020 12:16 pm
Forum: Technical / Scripting
Topic: Cannot recognize the correct image
Replies: 4
Views: 7120

Re: Cannot recognize the correct image

I noticed in your other FindImagePos SRTs you have a tolerance of 50, but this one is 0. Of course with 0 this means a perfect match is required. What happens if you increase your tolerance?
by Dorian (MJT support)
Fri Jul 31, 2020 10:03 am
Forum: Technical / Scripting
Topic: Compiled Scripts with Chromedriver functions are freezing
Replies: 2
Views: 3876

Re: Compiled Scripts with Chromedriver functions are freezing

Using Macro Scheduler 15.0.10 / Chrome 84.0.4147.105 / ChromeDriver 84.0.4147.30 (Win32) I just successfully compiled the "Chrome Example" script which you can find in samples, and everything executed successfully. I attempted to force an issue by removing my ChromeDriver file, but that simply gave...
by Dorian (MJT support)
Fri Jul 31, 2020 8:07 am
Forum: Beginners
Topic: How to get tags with two specific attribute=value in IEGetTagsByAttrib
Replies: 6
Views: 6137

Re: How to get tags with two specific attribute=value in IEGetTagsByAttrib

To be fair to you, that was probably beyond most beginners.

You'll find a lot of regex examples on this forum, plus there's a couple of free regex courses on Udemy, I think.
by Dorian (MJT support)
Thu Jul 30, 2020 4:12 pm
Forum: Beginners
Topic: How to get tags with two specific attribute=value in IEGetTagsByAttrib
Replies: 6
Views: 6137

Re: How to get tags with two specific attribute=value in IEGetTagsByAttrib

I hope I'm understanding correctly, but this will click the three "radio" "value=1" radio buttons. I tested this on a local file, so have used a dummy URL. Hopefully it's enough to get you started. //Create IE and Navigate IECreate>IE[0] IENavigate>IE[0],http://test.com/test.htm,res //Extract tag IE...
by Dorian (MJT support)
Wed Jul 29, 2020 9:48 am
Forum: Technical / Scripting
Topic: Window focus based upon a notification sound
Replies: 15
Views: 13543

Re: Window focus based upon a notification sound

I wrote THIS a few years back. It might be useful or it might not be useful. Hope it helps. That's very clever. Thank you, Dick. That makes me wonder if simply using GetPixelColor on that would work. I hadn't ever noticed the colour changes when it plays a sound. I'm using Win10. I'll check later. ...
by Dorian (MJT support)
Wed Jul 29, 2020 7:57 am
Forum: Technical / Scripting
Topic: Window focus based upon a notification sound
Replies: 15
Views: 13543

Re: Window focus based upon a notification sound

I wrote THIS a few years back. It might be useful or it might not be useful. Hope it helps. That's very clever. Thank you, Dick. That makes me wonder if simply using GetPixelColor on that would work. I hadn't ever noticed the colour changes when it plays a sound. I'm using Win10. I'll check later.
by Dorian (MJT support)
Tue Jul 28, 2020 5:54 pm
Forum: Technical / Scripting
Topic: Window focus based upon a notification sound
Replies: 15
Views: 13543

Re: Window focus based upon a notification sound

How about we take a step back. What if you simply rotated through the windows, focusing each, and looked for the image each time?
by Dorian (MJT support)
Tue Jul 28, 2020 4:03 pm
Forum: Technical / Scripting
Topic: Window focus based upon a notification sound
Replies: 15
Views: 13543

Re: Window focus based upon a notification sound

What about ReadFile, and then just get the length?
by Dorian (MJT support)
Tue Jul 28, 2020 12:40 pm
Forum: Technical / Scripting
Topic: Window focus based upon a notification sound
Replies: 15
Views: 13543

Re: Window focus based upon a notification sound

First of all, follow the instructions here . But use the attached files. You'll need to edit the paths of course. But this works, and will get you started. It's a custom trigger based on the file size changing. Trigger01 Create Ini will create an original an ini file containing the current file size...
cron
Sign up to our newsletter for free automation tips, tricks & discounts