Hey All,
Fairly new here, but loving Macro Scheduler.
I need a little help on two things.
First, I would like to display a window that updates with log messages. I found something similar to what I am talking about, monitoring a real time log, in this thread: http://www.mjtnet.com/forum/viewtopic.p ... t=real+log
But I am looking for something more for my users, like a status window that notes the progress of the script.
Second, I would like to have a button or window that indicates the macro is running... and either instructions on how to stop the macro i.e pess shift-escape to stop macro, or just a button to click.
I don't think I can do this with MS, I don't see anything that would let me open a window and write to it... other than say open notepad and write to it bouncing back and forth between the application I am controling and notepad for status updates.
Any ideas?
mondi
Status Window, Macro Running button
Moderators: Dorian (MJT support), JRL
Hi Mondi,
Go to Macro Scheduler help and look up "dialog". Also search this forum for "dialog". What you want to do will require you to become familiar with creating dialog boxes and populating the fields with information pulled from your log files and/or pushing information to your log files from user input through fields you set up in your dialog boxes. Macro Scheduler is a very useful tool in this regard. It is in fact the primary reason I own it. Everything you describe is possible. Find some sample dialog scripts and try them out.
Good luck,
Dick
Go to Macro Scheduler help and look up "dialog". Also search this forum for "dialog". What you want to do will require you to become familiar with creating dialog boxes and populating the fields with information pulled from your log files and/or pushing information to your log files from user input through fields you set up in your dialog boxes. Macro Scheduler is a very useful tool in this regard. It is in fact the primary reason I own it. Everything you describe is possible. Find some sample dialog scripts and try them out.
Good luck,
Dick
I have made some great progress with your suggestions Dick. I have my status window and I am updating it with messages as my script progresses.
I decided to use a Memo object becuase it seemed the most appropriate. The issue I am running into is, once I fill up the box additional messages are added of course, but the box does not scroll as new text is entered.
Is there a way to force this to scroll?
I suppose I could have the latest messages on top... Seems a little counterintuative, but it would work if there is no way to make the box scroll.
I suppose I could also clear the text after so many lines and write them to a log file...
Is a Memo object the best joice for this? Is there a way to make the memo object scroll with the new text? Or should I use one of my supposes above? .
Mondi
I decided to use a Memo object becuase it seemed the most appropriate. The issue I am running into is, once I fill up the box additional messages are added of course, but the box does not scroll as new text is entered.
Is there a way to force this to scroll?
I suppose I could have the latest messages on top... Seems a little counterintuative, but it would work if there is no way to make the box scroll.
I suppose I could also clear the text after so many lines and write them to a log file...
Is a Memo object the best joice for this? Is there a way to make the memo object scroll with the new text? Or should I use one of my supposes above? .
Mondi
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Send the memo object a CTRL-END sequence:
SetFocus>Your_Dialog
//ensure the memo is focused here
Press CTRL
Press End
Release CTRL
That's a low tech but very effective and easy solution. Another would be to use LibFunc with the Win32 API function SendMessage to send the memo a scroll message directly. Frankly, sending CTRL-END does the same in less code anyway.
SetFocus>Your_Dialog
//ensure the memo is focused here
Press CTRL
Press End
Release CTRL
That's a low tech but very effective and easy solution. Another would be to use LibFunc with the Win32 API function SendMessage to send the memo a scroll message directly. Frankly, sending CTRL-END does the same in less code anyway.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- tony_smith
- Pro Scripter
- Posts: 70
- Joined: Wed May 14, 2003 8:25 pm
- Location: Vancouver BC Canada
What about a progress bar as well? Here is something that I use versions of to give users a graphic and a progress window, just add loops to update the message and bar as required.
Message>Running
Let>k=0
Let>CPTN=Processing
Dialog>PROGBAR
Caption=%CPTN%
Left=550
Top=50
Width=451
Height=43
ProgressBar=PBAR,0,0,441,16,0
EndDialog>PROGBAR
Label>Start
If>k>99,End
Wait>1
GoSub>PROGRESS
GoTo>Start
Label>End
////////////////////SUBROUTINES//////////////
Srt>PROGRESS
Show>PROGBAR
Let>k=k+10
Let>PROGBAR.PBAR=k
ResetDialogAction>PROGBAR
End>PROGRESS
[/code]
Message>Running
Let>k=0
Let>CPTN=Processing
Dialog>PROGBAR
Caption=%CPTN%
Left=550
Top=50
Width=451
Height=43
ProgressBar=PBAR,0,0,441,16,0
EndDialog>PROGBAR
Label>Start
If>k>99,End
Wait>1
GoSub>PROGRESS
GoTo>Start
Label>End
////////////////////SUBROUTINES//////////////
Srt>PROGRESS
Show>PROGBAR
Let>k=k+10
Let>PROGBAR.PBAR=k
ResetDialogAction>PROGBAR
End>PROGRESS
[/code]