DaLiMan Posted March 8, 2005 Share Posted March 8, 2005 Hi, When I start my GUI I have 2 button from which I select a function to run. Now when I CANCEL this function half the way, I want my GUI to be back on top. This is al working fine, but the buttons on my GUI don't react anymore after that. Can someone tell me what I am doing wrong? Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 8, 2005 Share Posted March 8, 2005 code please. [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
DaLiMan Posted March 8, 2005 Author Share Posted March 8, 2005 code please.<{POST_SNAPBACK}>See below. expandcollapse popup#include <GuiConstants.au3> Dim $Name = "ITP manager" Dim $Today = @MDAY & "-" & @MON & "-" & @YEAR Dim $Naam = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\DanaData\DanaWare\MSet\Dananet", "FULLNAME") Dim $URL_Order = "http://nlshqws1/solaritp/modellinkpreviewright.asp?model=order.itp&label=Order" Dim $URL_Offerte = "http://nlshqws1/solaritp/modellinkpreviewright.asp?model=offerte.itp&label=Offerte" AutoItSetOption("WinTitleMatchMode",2) MouseMove(1013,33,0) ; Script generated by AutoBuilder 0.5 Prototype GuiCreate($Name, 262, 135,(@DesktopWidth-262)/2, (@DesktopHeight-135)/2 , $WS_SYSMENU+$WS_CAPTION) $But_Order = GuiCtrlCreateButton("Orderbevestiging", 20, 60, 100, 40) $But_Offerte = GuiCtrlCreateButton("Offerte", 140, 60, 100, 40) $Label_3 = GuiCtrlCreateLabel(" Datum : " & $Today &@CRLF& " Gebruiker : " & $Naam, 20, 0, 222, 30, $SS_SUNKEN) $Group_5 = GuiCtrlCreateGroup("Geef uw keuze :", 10, 40, 240, 70) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $But_Order _Orderbev() Case $msg = $But_Offerte _Offerte() Case Else ;;; EndSelect WEnd ;~ Exit Func _Offerte() If WinExists("Run Model - Microsoft Internet Explorer") = 1 Then WinClose("Run Model - Microsoft Internet Explorer", "") EndIf Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE") WinWait("Microsoft Internet Explorer", "Done") Sleep(750) WinSetTitle("Microsoft Internet Explorer","","Orderbev") ControlSend("Orderbev","","Edit1",$URL_Offerte) ControlSend("Orderbev","","Edit1","^{DEL} {ENTER}") WinWait("Run Model - Microsoft Internet Explorer", "Done") ControlSend("Run Model - Microsoft Internet Explorer","","Internet Explorer_Server1","{LEFT}") ControlSend("Run Model - Microsoft Internet Explorer","","Internet Explorer_Server1","{TAB}") ControlSend("Run Model - Microsoft Internet Explorer","","Internet Explorer_Server1","{SPACE}") ControlSend("Run Model - Microsoft Internet Explorer","","Internet Explorer_Server1","{ENTER}") MouseMove(1013,33,0) Sleep(3000) WinWait("Run Model - Microsoft Internet Explorer", "Done") Sleep(1000) _OrdNr() EndFunc Func _Orderbev() If WinExists("Run Model - Microsoft Internet Explorer") = 1 Then WinClose("Run Model - Microsoft Internet Explorer", "") EndIf Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE") WinWait("Microsoft Internet Explorer", "Done") Sleep(750) WinSetTitle("Microsoft Internet Explorer","","Orderbev") ControlSend("Orderbev","","Edit1",$URL_Order) ControlSend("Orderbev","","Edit1","^{DEL} {ENTER}") WinWait("Run Model - Microsoft Internet Explorer", "Done") ControlSend("Run Model - Microsoft Internet Explorer","","Internet Explorer_Server1","{LEFT}") ControlSend("Run Model - Microsoft Internet Explorer","","Internet Explorer_Server1","{TAB}") ControlSend("Run Model - Microsoft Internet Explorer","","Internet Explorer_Server1","{SPACE}") ControlSend("Run Model - Microsoft Internet Explorer","","Internet Explorer_Server1","{ENTER}") MouseMove(1013,33,0) Sleep(3000) WinWait("Run Model - Microsoft Internet Explorer", "Done") Sleep(1000) _OrdNr() EndFunc Func _OrdNrChk() If $Error Then _Terminate() ElseIf $OrdNr < 1800000 Then MsgBox(0,$Name,"Voer een correct ordernummer in.") _OrdNr() EndIf _OrdNrOpen() EndFunc Func _OrdNrOpen() ControlSend("Run Model - Microsoft Internet Explorer","","Internet Explorer_Server1",$OrdNr) ControlSend("Run Model - Microsoft Internet Explorer","","Internet Explorer_Server1","{ENTER}") MouseMove(1013,33,0) Sleep(1500) WinWait("Run Model - Microsoft Internet Explorer", "Done") Sleep(1000) ControlSend("Run Model - Microsoft Internet Explorer","","Internet Explorer_Server1","{TAB}") ControlSend("Run Model - Microsoft Internet Explorer","","Internet Explorer_Server1","{ENTER}") Sleep(15000) _Terminate() EndFunc Func _OrdNr() Global $OrdNr = InputBox($Name,"Geef het ordernummer ....","","",-1,130) Global $Error = @error _OrdNrChk() EndFunc Func _Terminate() WinClose("Run Model - Microsoft Internet Explorer") GUISwitch($Name) EndFunc Link to comment Share on other sites More sharing options...
Holger Posted March 8, 2005 Share Posted March 8, 2005 Use at the beginning of the script:Opt("TrayIconDebug",1)and see where it hangs...at the moment it hangs at the line:WinWait("Microsoft Internet Explorer", "Done") Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
DaLiMan Posted March 8, 2005 Author Share Posted March 8, 2005 Use at the beginning of the script:Opt("TrayIconDebug",1)and see where it hangs...at the moment it hangs at the line:WinWait("Microsoft Internet Explorer", "Done")<{POST_SNAPBACK}>Thanx Holger,I should use this option more often. Will save me a lot of mindbreaking time wondering what is going on.Also found my problem in the Func _OrdNrChk().Problem solved and script is up and running. 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