Search found 3346 matches

by JRL
Mon Feb 17, 2020 1:59 pm
Forum: Technical / Scripting
Topic: Radio button question
Replies: 3
Views: 1207

Re: Radio button question

Not sure how this accomplishes anything but here's an example Dialog>Dialog1 object Dialog1: TForm Left = 557 Top = 96 HelpContext = 5000 BorderIcons = [biSystemMenu] Caption = 'CustomDialog' ClientHeight = 211 ClientWidth = 476 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowT...
by JRL
Mon Feb 10, 2020 10:01 pm
Forum: Beginners
Topic: Set return value of dialog1 to dialoge2
Replies: 2
Views: 1185

Re: Set return value of dialog1 to dialoge2

First to set code to display properly in the forum, highlight the code then press the </> button located just above the text box. With the code: - Dialogs created using Macro Scheduler version 12 and beyond no longer need ResetDialogAction> - You have created a variable named "Text". "Text" is the n...
by JRL
Mon Feb 10, 2020 9:04 pm
Forum: Technical / Scripting
Topic: GetWindowSize returns size of combobox
Replies: 4
Views: 1222

Re: GetWindowSize returns size of combobox

I can't explain why what you've posted does what it does. It's bizarre and seems to me to be a bug. We'll have to wait and see if Marcus weighs in. I did some experimenting and found that if you change the text of the combobox prior to getting the window size, you get the size of the selected window...
by JRL
Thu Feb 06, 2020 5:31 am
Forum: Enhancement Suggestions
Topic: [documentation] Windows Key Event
Replies: 2
Views: 2727

Re: [documentation] Windows Key Event

As is the case with all 5 modifier keys. Using Key_down,VK16 for a shift key press detection does not work if the modifier parameter is anything but 1 which is the shift key modifier parameter. Etc. /* 91,92,16,17,18 lwin,rwin,shift,ctrl,alt */ OnEvent>key_down,VK16,1,quit OnEvent>key_down,VK17,2,qu...
by JRL
Tue Feb 04, 2020 2:21 pm
Forum: Technical / Scripting
Topic: Determining if a Macro is already running
Replies: 10
Views: 2081

Re: Determining if a Macro is already running

I like to use a dialog. If a dialog block is encountered the dialog becomes an existing window that can be detected. Put this code at the start of your script, if the window specified in the code already exists, a consecutive start of your executable will stop. If the running executable stops, the p...
by JRL
Tue Feb 04, 2020 4:30 am
Forum: Beginners
Topic: If statement help
Replies: 2
Views: 1283

Re: If statement help

You have a space between the second "If" and its affiliated ">". Basically, making the line a remark that is ignored.
by JRL
Mon Feb 03, 2020 6:07 pm
Forum: Beginners
Topic: Kernel32 readprocessmemory
Replies: 1
Views: 1043

Re: Kernel32 readprocessmemory

AFAIK, if the windows API wants you to set a "pointer", the function will not work within Macro Scheduler. I have wondered whether "memory pointer needed" APIs might work using Python in Macro Scheduler but I have not yet tried. Read Marcus' comments in THIS THREAD. Maybe something like THIS will help
by JRL
Mon Feb 03, 2020 5:31 pm
Forum: Technical / Scripting
Topic: How do I create a button that doesn't close a dialog?
Replies: 5
Views: 1498

Re: How do I create a button that doesn't close a dialog?

Fixed the dialog. Sorry for any confusion. You are correct that the modalresult property must be set to zero. Its been so long since I've used the pre-version 12 dialog format that I'd forgotten about that. It is important to note that you will never see the modal result until the dialog closes. If ...
by JRL
Sun Feb 02, 2020 7:39 am
Forum: Enhancement Suggestions
Topic: Compiled or script (variable wanted)
Replies: 6
Views: 3416

Re: Compiled or script (variable wanted)

Sorry, I didn't read to the bottom of your script to see that you were using the msched.exe. You could boil it down by one more line by using StringReplace or by making the regex all one line. //StringReplace>COMMAND_LINE," ,,SCRIPT_DIR_EXE //Or //RegEx>(?<=").*?(?="),COMMAND_LINE,0,SCRIPT_DIR_EXE,,...
by JRL
Sun Feb 02, 2020 6:38 am
Forum: Technical / Scripting
Topic: How do I create a button that doesn't close a dialog?
Replies: 5
Views: 1498

Re: How do I create a button that doesn't close a dialog

Edit: Fixed the Dialog caption so the script will run. Dialog>Dialog1 object Dialog1: TForm Caption = 'Button Won''t Close' ClientHeight = 269 ClientWidth = 429 object MSButton1: tMSButton Left = 170 Top = 170 Width = 75 Height = 25 Caption = 'Press Me' end end EndDialog>Dialog1 AddDialogHandler>Dia...
by JRL
Sun Feb 02, 2020 6:25 am
Forum: Enhancement Suggestions
Topic: Compiled or script (variable wanted)
Replies: 6
Views: 3416

Re: Compiled or script (variable wanted)

Looks to me like your scripts would be less complicated if you simply used the "Extract" functions.

Code: Select all

ExtractFileName>command_line,startedBy
MDL>startedBy

ExtractFilePath>script_dir,runningFromParent
mdl>runningFromParent
by JRL
Sun Feb 02, 2020 1:01 am
Forum: General Discussion
Topic: Are the comments stripped out of the compiled script?
Replies: 2
Views: 2947

Re: Are the comments stripped out of the compiled script?

I'd say leave out the large comments and probably also remove unnecessary spaces. The script with a commented block runs in 3 seconds when compiled. The script without the comment runs in 2 seconds when compiled. Your results may vary. Let>kk=0 Repeat>kk Add>kk,1 /* xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
by JRL
Sun Feb 02, 2020 12:41 am
Forum: The Water Cooler
Topic: Happy 15th forum birthday to JRL
Replies: 8
Views: 5246

Re: Happy 15th forum birthday to JRL

Thank you.
And a happy 17.25 forum years to you H2k.

Dick
by JRL
Wed Jan 29, 2020 2:38 pm
Forum: The Water Cooler
Topic: DelArray / DelVariable
Replies: 6
Views: 4691

Re: DelArray / DelVariable

@PepsiHog Piffle! Being wrong just means you're pushing your personal envelope. Thomas Edison , my favorite American A-Hole said: :idea:"I have not failed. I've just found 10,000 ways that won't work." :idea: Remember Bob Hansen? Before I came along he had the most forum posts of any non-Macro Sched...
Sign up to our newsletter for free automation tips, tricks & discounts