Roofel Posted February 19, 2008 Posted February 19, 2008 Hello:) I just wonder, What "Style" do i have to use on GuiCreate to get the GUI to be always ontop? Just like the Windows Task Manager, How can i make it always appear ontop? Tried looking through the AutoIt Help but couldnt find anything in the different styles about it:S even tried some but didnt work... Also another thing:) How can i get a window to restore after doubleclicking/clicking on the tray icon? and getting a window to close without exitting the script?^^, Hope you can help, Roofel:) Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D
Swift Posted February 19, 2008 Posted February 19, 2008 you must use $TRAY_EVENT_PRIMARY_DOUBLE to check if the icon is double-clicked...then to restore put under it.. GUISetState(@SW_SHOW, $gui) Not sure about a style about it...but you could always put in your loop WinSetOnTop($gui) Hope this helps Roofel
Roofel Posted February 19, 2008 Author Posted February 19, 2008 and if I'm allowed to ask, where do i put the $TRAY_EVENT_PRIMARY_DOUBLE? Inside the While 1 group or somewhere else? I now got a idea on how to restore the window but how to close it? When i click the "X" button it closes the script:S Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D
Swift Posted February 20, 2008 Posted February 20, 2008 (edited) Of Course you can ask anything its Supposted to close the script...but you can change that...where $GUI_EVENT_CLOSE is...under it...instead of Exit...put GUISetState(@SW_HIDE, $gui) and that will make the window disappear...but the script will still be running...then...Do this...inside your loop $tray = TrayGetMsg() Select Case $tray = $GUI_EVENT_PRIMARY_DOUBLE GUISetState(@SW_SHOW, $gui) Edited February 20, 2008 by Swift
Roofel Posted February 20, 2008 Author Posted February 20, 2008 (edited) Hmm, getting an error, the GUI_EVENT_PRIMARY_DOUBLE is taken as a Variable i gotta declare first:S Any idea on how i can get past this? Edit: This isnt a future added in the beta files is it? Got both installed on my computer but using Release version at the moment=) Edit2: Not in the beta either. Edited February 20, 2008 by Roofel Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D
Swift Posted February 20, 2008 Posted February 20, 2008 You dont have to declare it...use #Include <GuiConstants.au3>
Roofel Posted February 20, 2008 Author Posted February 20, 2008 I got it included since i basicly need it on every script i got but it still gives and error message:S You using Beta files or Release files? Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D
Swift Posted February 20, 2008 Posted February 20, 2008 I got it included since i basicly need it on every script i got but it still gives and error message:SYou using Beta files or Release files?Release...hmm...? Go do a forum search for PassSecure...and get the source file..look at the source...it has that...and it works...? Am I missing something any 'higher' person than me? Why doesnt this work?
Roofel Posted February 20, 2008 Author Posted February 20, 2008 (edited) Nope:S nothing in any of them, looked through every of the Include files, none had any words about PRIMARY_DOUBLEChecking the beta file Includes nowNot in the beta Includes either:S Where the bloody hell is it?:SEdit: I searched for PassSecure and found only mine and this threadhttp://www.autoitscript.com/forum/index.ph...p;hl=PassSecureSearched all the include files and the source for the Keyword but found none... Edited February 20, 2008 by Roofel Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D
BrettF Posted February 22, 2008 Posted February 22, 2008 Nope:S nothing in any of them, looked through every of the Include files, none had any words about PRIMARY_DOUBLEChecking the beta file Includes nowNot in the beta Includes either:S Where the bloody hell is it?:SEdit: I searched for PassSecure and found only mine and this threadhttp://www.autoitscript.com/forum/index.ph...p;hl=PassSecureSearched all the include files and the source for the Keyword but found none...The GUIConstants.au3 has changed... Use #Include <Constants.au3> and you should be right. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Roofel Posted February 22, 2008 Author Posted February 22, 2008 Thanks Bert:) Found it while searching also, it wasnt $TRAY_EVENT_PRIMARY_DOUBLE but $TRAY_EVENT_PRIMARYDOUBLE:P One thing also:S When i put the Variable under TrayGetMsg() The window closes(Supposed to go into tray) but then it just shows up again:S Any ideas? Here is the script part. Tried all the different places and also tried SECONDARYDOUBLE.... expandcollapse popup#include <Constants.au3> #include <IE.au3> #include <GUIListbox.au3> Opt("TrayMenuMode",1) Opt("GUIDataSeparatorChar",2) HotKeySet("{Esc}", "Close");For use while testing:) $Form1= GUICreate("Find Airlines!", 403, 251, 616, 455) $Group1= GUICtrlCreateGroup("Search", 8, 8, 385, 233) $Button1= GUICtrlCreateButton("Google", 72, 72, 81, 49, 0) $Button2= GUICtrlCreateButton("Yahoo!", 160, 72, 81, 49, 0) $Button3= GUICtrlCreateButton("Kvasir", 248, 72, 81, 49, 0) $Label2= GUICtrlCreateLabel("With", 20, 87, 52, 25) $List1= GUICtrlCreateList("", 32, 123, 337, 71) $Input1= GUICtrlCreateInput("", 80, 39, 193, 21) $Label1= GUICtrlCreateLabel("Search for", 16, 40, 52, 17) $Listbtn=GUICtrlCreateButton("Add search to list", 280, 30, 100, 40) $Writebtn=GUICtrlCreateButton("Save searches", 32, 200, 169, 30) $Remove=GUICtrlCreateButton("Remove selected", 202, 200, 169, 30) $Menu=GUICtrlCreateContextMenu($List1) $Item1=GUICtrlCreateMenuItem("Add to search bar", $Menu) $Item2=GUICtrlCreateMenuItem("Remove from list", $Menu) $Iniload=IniRead("Search.ini", "Main", "Data", "") $Restore=TrayCreateItem("Restore Window") $Nothing=TrayCreateItem("") $About=TrayCreateItem("About") $Exit=TrayCreateItem("Exit program") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) GUICtrlSetData($List1, $Iniload) While 1 $nMsg = GUIGetMsg() WinSetOnTop($Form1, "", 1) Switch $nMsg Case $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $Form1) Case $Listbtn GUICtrlSetData($List1,Guictrlread($Input1)) Case $Remove _GUICtrlListBox_GetCurSel($List1) _GUICtrlListBox_DeleteString($List1,1) Case $Writebtn IniWrite("Search.ini", "Main", "Data", GUICtrlRead($List1)) Case $Button1 _IECreate('http://www.google.com/search?q='&GUICtrlRead($Input1),1,1,0) Case $Button2 _IECreate("http://www.kvasir.no/nettsok/searchResult.html?searchExpr="&GuiCtrlRead($Input1), 1,1,0) Case $Button3 _IECreate("http://search.yahoo.com/search;_ylt=A0geu9fhcrlHOHUB1JxXNyoA?p="&GUICtrlRead($Input1), 1,1,0) Case $Item1 GUICtrlSetData($Input1, GuictrlRead($List1)) Case $Item2 _GUICtrlListBox_GetCurSel($List1) _GUICtrlListBox_DeleteString($List1,1) EndSwitch $Msg=TrayGetMsg() Select Case $Msg=$Restore GUISetState(@SW_SHOW, $Form1) Case $Msg=$About MsgBox(64, "about:", "This program was created by Roofel using the amazing software AutoIt") Case $Msg=$Exit Exit EndSelect WEnd Func Close() Exit EndFunc Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D
BrettF Posted February 22, 2008 Posted February 22, 2008 I have no idea what your asking. Do you mean? expandcollapse popup#include <Constants.au3> #include <IE.au3> #include <GUIListbox.au3> Opt("TrayMenuMode",1) Opt("GUIDataSeparatorChar",2) TraySetClick (8) HotKeySet("{Esc}", "Close");For use while testing:) $Form1= GUICreate("Find Airlines!", 403, 251, 616, 455) $Group1= GUICtrlCreateGroup("Search", 8, 8, 385, 233) $Button1= GUICtrlCreateButton("Google", 72, 72, 81, 49, 0) $Button2= GUICtrlCreateButton("Yahoo!", 160, 72, 81, 49, 0) $Button3= GUICtrlCreateButton("Kvasir", 248, 72, 81, 49, 0) $Label2= GUICtrlCreateLabel("With", 20, 87, 52, 25) $List1= GUICtrlCreateList("", 32, 123, 337, 71) $Input1= GUICtrlCreateInput("", 80, 39, 193, 21) $Label1= GUICtrlCreateLabel("Search for", 16, 40, 52, 17) $Listbtn=GUICtrlCreateButton("Add search to list", 280, 30, 100, 40) $Writebtn=GUICtrlCreateButton("Save searches", 32, 200, 169, 30) $Remove=GUICtrlCreateButton("Remove selected", 202, 200, 169, 30) $Menu=GUICtrlCreateContextMenu($List1) $Item1=GUICtrlCreateMenuItem("Add to search bar", $Menu) $Item2=GUICtrlCreateMenuItem("Remove from list", $Menu) $Iniload=IniRead("Search.ini", "Main", "Data", "") $Restore=TrayCreateItem("Restore Window") TrayCreateItem("") $About=TrayCreateItem("About") TrayCreateItem("") $Exit=TrayCreateItem("Exit program") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) GUICtrlSetData($List1, $Iniload) While 1 $nMsg = GUIGetMsg() WinSetOnTop($Form1, "", 1) Switch $nMsg Case $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $Form1) Case $Listbtn GUICtrlSetData($List1,Guictrlread($Input1)) Case $Remove _GUICtrlListBox_GetCurSel($List1) _GUICtrlListBox_DeleteString($List1,1) Case $Writebtn IniWrite("Search.ini", "Main", "Data", GUICtrlRead($List1)) Case $Button1 _IECreate('http://www.google.com/search?q='&GUICtrlRead($Input1),1,1,0) Case $Button2 _IECreate("http://www.kvasir.no/nettsok/searchResult.html?searchExpr="&GuiCtrlRead($Input1), 1,1,0) Case $Button3 _IECreate("http://search.yahoo.com/search;_ylt=A0geu9fhcrlHOHUB1JxXNyoA?p="&GUICtrlRead($Input1), 1,1,0) Case $Item1 GUICtrlSetData($Input1, GuictrlRead($List1)) Case $Item2 _GUICtrlListBox_GetCurSel($List1) _GUICtrlListBox_DeleteString($List1,1) EndSwitch $Msg=TrayGetMsg() Select Case $Msg=$Restore GUISetState(@SW_SHOW, $Form1) Case $Msg=$About MsgBox(64, "About:", "This program was created by Roofel using the amazing software AutoIt") Case $Msg=$Exit Exit Case $Msg = $TRAY_EVENT_PRIMARYDOUBLE GUISetState(@SW_SHOW, $Form1) EndSelect WEnd Func Close() Exit EndFunc Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Roofel Posted February 23, 2008 Author Posted February 23, 2008 I have no idea what your asking. Do you mean? expandcollapse popup#include <Constants.au3> #include <IE.au3> #include <GUIListbox.au3> Opt("TrayMenuMode",1) Opt("GUIDataSeparatorChar",2) TraySetClick (8) HotKeySet("{Esc}", "Close");For use while testing:) $Form1= GUICreate("Find Airlines!", 403, 251, 616, 455) $Group1= GUICtrlCreateGroup("Search", 8, 8, 385, 233) $Button1= GUICtrlCreateButton("Google", 72, 72, 81, 49, 0) $Button2= GUICtrlCreateButton("Yahoo!", 160, 72, 81, 49, 0) $Button3= GUICtrlCreateButton("Kvasir", 248, 72, 81, 49, 0) $Label2= GUICtrlCreateLabel("With", 20, 87, 52, 25) $List1= GUICtrlCreateList("", 32, 123, 337, 71) $Input1= GUICtrlCreateInput("", 80, 39, 193, 21) $Label1= GUICtrlCreateLabel("Search for", 16, 40, 52, 17) $Listbtn=GUICtrlCreateButton("Add search to list", 280, 30, 100, 40) $Writebtn=GUICtrlCreateButton("Save searches", 32, 200, 169, 30) $Remove=GUICtrlCreateButton("Remove selected", 202, 200, 169, 30) $Menu=GUICtrlCreateContextMenu($List1) $Item1=GUICtrlCreateMenuItem("Add to search bar", $Menu) $Item2=GUICtrlCreateMenuItem("Remove from list", $Menu) $Iniload=IniRead("Search.ini", "Main", "Data", "") $Restore=TrayCreateItem("Restore Window") TrayCreateItem("") $About=TrayCreateItem("About") TrayCreateItem("") $Exit=TrayCreateItem("Exit program") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) GUICtrlSetData($List1, $Iniload) While 1 $nMsg = GUIGetMsg() WinSetOnTop($Form1, "", 1) Switch $nMsg Case $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $Form1) Case $Listbtn GUICtrlSetData($List1,Guictrlread($Input1)) Case $Remove _GUICtrlListBox_GetCurSel($List1) _GUICtrlListBox_DeleteString($List1,1) Case $Writebtn IniWrite("Search.ini", "Main", "Data", GUICtrlRead($List1)) Case $Button1 _IECreate('http://www.google.com/search?q='&GUICtrlRead($Input1),1,1,0) Case $Button2 _IECreate("http://www.kvasir.no/nettsok/searchResult.html?searchExpr="&GuiCtrlRead($Input1), 1,1,0) Case $Button3 _IECreate("http://search.yahoo.com/search;_ylt=A0geu9fhcrlHOHUB1JxXNyoA?p="&GUICtrlRead($Input1), 1,1,0) Case $Item1 GUICtrlSetData($Input1, GuictrlRead($List1)) Case $Item2 _GUICtrlListBox_GetCurSel($List1) _GUICtrlListBox_DeleteString($List1,1) EndSwitch $Msg=TrayGetMsg() Select Case $Msg=$Restore GUISetState(@SW_SHOW, $Form1) Case $Msg=$About MsgBox(64, "About:", "This program was created by Roofel using the amazing software AutoIt") Case $Msg=$Exit Exit Case $Msg = $TRAY_EVENT_PRIMARYDOUBLE GUISetState(@SW_SHOW, $Form1) EndSelect WEnd Func Close() Exit EndFunc Exactly what i needed:) Thanks alot mate^^, Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D
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