Markus Posted October 16, 2005 Share Posted October 16, 2005 Hello! I wrote a script to look for numbers who can only be divided through themselves and through 1. 2,3,5,7,11,13,17,19 and so on. It works very nice. But there are some problems left. because in this script i also have many other functions, its a gui maths box u can do many things that have to do with maths. So I have many buttons. The problem now is, that if I start the search function with a GUICtrlSetOnEvent-button and i want to use another button/function with a set on event function, the second button function doesnt start, because the PC wants to finish the search function, startet by the first button. Is there any way to stop the search function by a button, while search function is running? Please help me. Maybe there's already a topic posted, but i haven't found one, that's exactly about my problem. "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output Link to comment Share on other sites More sharing options...
BigDod Posted October 16, 2005 Share Posted October 16, 2005 Hello!I wrote a script to look for numbers who can only be divided through themselves and through 1.2,3,5,7,11,13,17,19 and so on. It works very nice. But there are some problems left. because in this script i also have many other functions, its a gui maths box u can do many things that have to do with maths. So I have many buttons. The problem now is, that if I start the search function with a GUICtrlSetOnEvent-button and i want to use another button/function with a set on event function, the second button function doesnt start, because the PC wants to finish the search function, startet by the first button. Is there any way to stop the search function by a button, while search function is running? Please help me. Maybe there's already a topic posted, but i haven't found one, that's exactly about my problem.You could use HotKeySet to setup a key to stop the search function. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Markus Posted October 17, 2005 Author Share Posted October 17, 2005 You could use HotKeySet to setup a key to stop the search function.Right, I used this solution but i didnt like it, because i want that my buttons are useable in this function. I hate uselss buttons. "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output Link to comment Share on other sites More sharing options...
seandisanti Posted October 17, 2005 Share Posted October 17, 2005 Right, I used this solution but i didnt like it, because i want that my buttons are useable in this function. I hate uselss buttons.instead of functions, you could use seperate compiled scripts (with tray icons disabled) that way when you click the button, it runs the other script with a Run() so it can continue it's own execution. without multi-threading, you kind of have to fake it. Link to comment Share on other sites More sharing options...
/dev/null Posted October 17, 2005 Share Posted October 17, 2005 because the PC wants to finish the search function, startet by the first button. Is there any way to stop the search function by a button, while search function is running? Please help me. Maybe there's already a topic posted, but i haven't found one, that's exactly about my problem.from the help file: OnEvent Mode In the On Event mode instead of constantly polling the GUI to find out if anything has happened you make the GUI temporarily pause your script and call a pre-defined function to handle the event. For example, if the user clicks Button1 the GUI halts your main script and calls a previously defined user function that deals with Button1So, I guess there is no way to interrupt your search function while it is running. To do so with one single script, we would need multithreading, which is not implemented. So, your options are:1.) Use HotKeySet2.) Use multiple Scripts for your functions, compile them and call em via Run(). However, then you'll have to pass the calling parameters and results between the scripts. Possible (through Registry, INI files or ENV variables) but kind of "ugly".CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
seandisanti Posted October 17, 2005 Share Posted October 17, 2005 from the help file: OnEvent Mode In the On Event mode instead of constantly polling the GUI to find out if anything has happened you make the GUI temporarily pause your script and call a pre-defined function to handle the event. For example, if the user clicks Button1 the GUI halts your main script and calls a previously defined user function that deals with Button1So, I guess there is no way to interrupt your search function while it is running. To do so with one single script, we would need multithreading, which is not implemented. So, your options are:1.) Use HotKeySet2.) Use multiple Scripts for your functions, compile them and call em via Run(). However, then you'll have to pass the calling parameters and results between the scripts. Possible (through Registry, INI files or ENV variables) but kind of "ugly".CheersKurtneat, maybe i am making progress... offered almost the same advice (although not as smart sounding) as kurt! Link to comment Share on other sites More sharing options...
/dev/null Posted October 17, 2005 Share Posted October 17, 2005 (edited) neat, maybe i am making progress... offered almost the same advice (although not as smart sounding) as kurt! I didn't see your reply. I started to write mine and was interrupted ...CheersKurt Edited October 17, 2005 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
seandisanti Posted October 17, 2005 Share Posted October 17, 2005 I didn't see your reply. I started to write mine and was interrupted ...CheersKurtbeen there a million times myself, but i really didn't mean it like that, was patting myself on the back for the similar response Link to comment Share on other sites More sharing options...
/dev/null Posted October 17, 2005 Share Posted October 17, 2005 been there a million times myself, but i really didn't mean it like that, was patting myself on the back for the similar responseNP!CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Markus Posted October 18, 2005 Author Share Posted October 18, 2005 Thank you very much I think that will help me "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output Link to comment Share on other sites More sharing options...
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