globster2000 Posted March 20, 2004 Posted March 20, 2004 Alright, I like to know if there are any coding to possible pause a script by minimizing a window. I already have function capabilities to pause the script by button, but i would like another function to pause the script by having a window minimized. Also, i was wondering what function do i use to pop up a titleless small window upon the autoit3 icon in the taskbar that can have text on it. Anyways, thanks for reading this post and consideration of solving this problem.
Developers Jos Posted March 20, 2004 Developers Posted March 20, 2004 do you mean that you want to have a script go into pause when another window is minimized? something like: AutoItSetOption("WinTitleMatchMode", 2) HotKeySet("{END}","Finish") While 1 while BitAnd(WinGetState("- Notepad",""),16) sleep(100) SplashTextOn("pausing","pausing",100,50,10,10) Wend SplashOff() ; do your other stuf Wend Func Finish() exit Endfunc SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
globster2000 Posted March 20, 2004 Author Posted March 20, 2004 do you mean that you want to have a script go into pause when another window is minimized? something like: AutoItSetOption("WinTitleMatchMode", 2) HotKeySet("{END}","Finish") While 1 while BitAnd(WinGetState("- Notepad",""),16) sleep(100) SplashTextOn("pausing","pausing",100,50,10,10) Wend SplashOff() ; do your other stuf Wend Func Finish() exit Endfunc hmm... im not exactly 100% sure what you just said, but from my interpetations i believe your asking if i want the script to pause if another meaning a second window is minimized; is that right? If so no. All i want is some kind of coding that can pause the script if a window is minimized. For example, say that i have notepad running and is maximized/active, and while maximized/active the script is going with different kinds of functions. However, when i minimize notepad the script stops and splashes up a msgbox saying if you want to exit the bot or return back to the script. As for your script u posted it looks quite interesting and may do the job im not sure because i never worked with functions BitAnd or AutoItSetOption. So knowing that i cannot draw up the conclusion of what ur script does. Anyways, thanks for your reply and please respond back .
Developers Jos Posted March 20, 2004 Developers Posted March 20, 2004 (edited) that's what the example script does.... start Notepad and run the script... you will see that a box pop's up when you minimize Notepad..... In this case the "END" key will stop the script. Edited March 20, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
globster2000 Posted March 20, 2004 Author Posted March 20, 2004 k thank you very much; ill try it out tonight see if it works which im pretty sure it will hopefuly =/. Anyways, since thats done all i need help now is how to make a message box with words and etc.. appear above the autoit 3 icon on the taskbar.
Developers Jos Posted March 20, 2004 Developers Posted March 20, 2004 (edited) all i need help now is how to make a message box with words and etc.. appear above the autoit 3 icon on the taskbar.This the command to show the balloon above the systemtray icon: TrayTip ( "title", "text", timeout [, option] ) Edited March 20, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Helge Posted March 20, 2004 Posted March 20, 2004 (edited) all i need help now is how to make a message box with words and etc.. appear above the autoit 3 icon on the taskbar.If I understood that correctly, then I think you should check out eitherTrayTip or ToolTip...EDIT :After writing this, I saw that JdeB had been writing something too..PS !If you use TrayTip you have to know that the TrayTip can be disabledby the Windows-user, but if you use ToolTip then that's not a problem..I think.. Edited March 20, 2004 by Helge
globster2000 Posted March 21, 2004 Author Posted March 21, 2004 (edited) How do u use tooltip? and for tray tip what is [option] and timeout? Can you give an example of something?edited- Ah one more thing about the window minimize coding that you gave. I have a problem with it because as you know this coding only works if it is ran by at the moment u want it paused, but the thing is the script im using is so big that it will take about a good 2 mins before the script gets the function described above. Anyways, i wanted a script that can be effective for the whole time its running and dont have to be repeated more then once kind of like how the adlib function with hotkey function does with pausing by button. Keep in mind that my script contains over 2000 lines. Edited March 21, 2004 by globster2000
Developers Jos Posted March 21, 2004 Developers Posted March 21, 2004 You can do the testing with the AdlibEnable so it will do the test every 250 ms (or the time you set it)AutoItSetOption("WinTitleMatchMode", 2) HotKeySet("{END}","Finish") AdlibEnable ( "TestMin") While 1 ; do your other stuff Wend Func Finish() exit Endfunc Func TestMin() while BitAnd(WinGetState("- Notepad",""),16) sleep(100) SplashTextOn("pausing","pausing",100,50,10,10) Wend SplashOff() EndfuncCut&Paste from the helpfile: ToolTip:Creates a tooltip anywhere on the screen. ToolTip ( "text" [, x, y] )TrayTip ( "title", "text", timeout [, option] )timeout: A rough estimate of the time the balloon tip should be displayed. (Windows has a min and max of about 10-30 seconds but does not always honor a time in that range.) option: [optional] 0=No icon (default), 1=Info icon, 2=Warning icon, 3=Error icon SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
globster2000 Posted March 21, 2004 Author Posted March 21, 2004 (edited) Ok Thanks very much it seems that its working now =D. Oh yea one more thing is it possible for Autoit 3 to access a website or something and gather info, and how do you have autoit 3 read time from one given point to another? Kind of like a stopwatch. Edited March 21, 2004 by globster2000
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now