Emiel Wieldraaijer Posted October 25, 2006 Share Posted October 25, 2006 (edited) HI All, This is my first post on this forum so please be gentle I'm also new to AutoIT/Programming and i've got a little problem I'm call a Func which Loops... to check if a connection is persistent.. But this will disable the other functions in the GUI so i'm not able to disconnect Is there a way to call a function in the background ? TIA Emiel Edited October 25, 2006 by Emiel Wieldraaijer Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
lod3n Posted October 25, 2006 Share Posted October 25, 2006 You've already got a loop going for the GUI, presumably. Check the state just once in the function, and call the function in the GUI loop. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted October 25, 2006 Author Share Posted October 25, 2006 @lod3n Thnx for the reply .. i get your point .. and i had a look at the code .. but the only loop is the one which checks the tray Emiel Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
AzKay Posted October 25, 2006 Share Posted October 25, 2006 GUIGetMsg()? # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted October 25, 2006 Author Share Posted October 25, 2006 @AzKay Do you mean i can resolve it by using GuiGetMessage just like the tray menu ? Thnx Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
jvanegmond Posted October 25, 2006 Share Posted October 25, 2006 (edited) The proper way to do this is called "GUIOnEventMode" the functions that are used with this special mode are called "GUICtrlSetOnEvent" and "GUISetOnEvent". Edit: I should also say, that you don't run the function in the background, but you run the GUI in the background and should put your function in the main loop. :] Edited October 25, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted October 25, 2006 Author Share Posted October 25, 2006 @Manadar Thnx very much (=dankjewel in Dutch).. i'll try to figure it out Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
Emiel Wieldraaijer Posted October 27, 2006 Author Share Posted October 27, 2006 @All Sorry but all you GURU's were wrong Because i couldn't get it working i thought lets spend a lot of time by reading every item in the Help FileI was lucky The function for running a function in the background existsStart a Background Function => AdlibEnable ( "function" [, time] )End a Background Function => AdlibDisable ( )Thanks for your time Emiel Best regards,Emiel Wieldraaijer Link to comment Share on other sites More sharing options...
lod3n Posted October 27, 2006 Share Posted October 27, 2006 Because i couldn't get it working i thought lets spend a lot of time by reading every item in the Help FileThat is fantastic news! Also, it's good you solved your problem. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] 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