retaly Posted February 26, 2012 Share Posted February 26, 2012 (edited) hy, i know where is the problem,fixed it, then here is the good script: expandcollapse popupWhile 1 While 1 $aMsg = GUIGetMsg(1) ; Use advanced parameter to get array Switch $aMsg[1] ; check which GUI sent the message Case $hGUI1 Switch $aMsg[0] ; Now check for the messages for $hGUI1 Case $GUI_EVENT_CLOSE ; If we get the CLOSE message from this GUI - we exit <<<<<<<<<<<<<<< ExitLoop Case $useit GUICtrlSetState($useit, $GUI_DISABLE) gui2() Case $detect If WinExists(GUICtrlRead($progress)) Then GUICtrlSetData($status, "Run!") Else GUICtrlSetData($status, "Not Running!") EndIf Case $exit For $i = 0 To 13 IniWrite($sIniFile, "Napló", $i, GUICtrlRead($aControlID[$i])) Next Exit Case $GUI_EVENT_CLOSE For $i = 0 To 13 IniWrite($sIniFile, "Napló", $i, GUICtrlRead($aControlID[$i])) Next Exit Case $btnStop _Check4Stop() Case $btnStart _Check4Start() EndSwitch Case $hGUI2 Switch $aMsg[0] ; Now check for the messages for $hGUI2 Case $GUI_EVENT_CLOSE ; If we get the CLOSE message from this GUI - we just delete the GUI <<<<<<<<<<<<<<< GUIDelete($hGUI2) GUICtrlSetState($useit, $GUI_ENABLE) EndSwitch EndSwitch WEnd EndFunc ;==>gui1 and i dont use that script, its from my old script, but i cant use, this is the script: ; cmd If $Start = 1 Then If GUICtrlRead($Checkbox1) = 1 Then ; 1st send,check, etc.. $ism = GUICtrlRead($btnStart) If WinActive(GUICtrlRead($progress)) Then Send(GUICtrlRead($s1)) Sleep(GUICtrlRead($w1)) _Delayer() EndIf EndIf EndIf so i wanna paste this old script in the fist script,, plz help Edited February 26, 2012 by retaly Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 26, 2012 Moderators Share Posted February 26, 2012 retaly,Nothing to do with your problem, but does the code you are actually working on look the same as the code you posted? Have you never heard of Tidy - a utility you get with the full SciTE4AutoIt3 version of the editor? It makes your code properly indented and also picks out errors - like the fact that you have a While too much and a Func too few in that snippet. Once I have run Tidy on the snippets I will see what I can do to help - but please make it easy for us to help you and run it on your code before posting. The same goes for anyone else reading this - having neat code (which only takes a key press) really helps anyone trying to debug it. M23 somdcomputerguy 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 26, 2012 Moderators Share Posted February 26, 2012 retaly,Where is that second snippet supposed to go in the first? Within the loop? Within what I assume is a function but outside the loop? "paste this old script in the fist script" is not really much to go on. Can you please explain what you are trying to do. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
retaly Posted February 26, 2012 Author Share Posted February 26, 2012 i mean, wanna to paste the cmd script in this script part: expandcollapse popupWhile 1 While 1 $aMsg = GUIGetMsg(1) ; Use advanced parameter to get array Switch $aMsg[1] ; check which GUI sent the message Case $hGUI1 Switch $aMsg[0] ; Now check for the messages for $hGUI1 Case $GUI_EVENT_CLOSE ; If we get the CLOSE message from this GUI - we exit <<<<<<<<<<<<<<< ExitLoop Case $useit GUICtrlSetState($useit, $GUI_DISABLE) gui2() Case $detect If WinExists(GUICtrlRead($progress)) Then GUICtrlSetData($status, "Run!") Else GUICtrlSetData($status, "Not Running!") EndIf Case $exit For $i = 0 To 13 IniWrite($sIniFile, "Napló", $i, GUICtrlRead($aControlID[$i])) Next Exit Case $GUI_EVENT_CLOSE For $i = 0 To 13 IniWrite($sIniFile, "Napló", $i, GUICtrlRead($aControlID[$i])) Next Exit Case $btnStop _Check4Stop() Case $btnStart _Check4Start() EndSwitch Case $hGUI2 Switch $aMsg[0] ; Now check for the messages for $hGUI2 Case $GUI_EVENT_CLOSE ; If we get the CLOSE message from this GUI - we just delete the GUI <<<<<<<<<<<<<<< GUIDelete($hGUI2) GUICtrlSetState($useit, $GUI_ENABLE) EndSwitch EndSwitch WEnd EndFunc ;==>gui1 cmd: ; cmd If $Start = 1 Then If GUICtrlRead($Checkbox1) = 1 Then ; 1st send,check, etc.. $ism = GUICtrlRead($btnStart) If WinActive(GUICtrlRead($progress)) Then Send(GUICtrlRead($s1)) Sleep(GUICtrlRead($w1)) _Delayer() EndIf EndIf EndIf because its working without multipled gui, but with multipled gui i cant use that cmd.. :S, for example i tryed to do: expandcollapse popupWhile 1 $nMsg = GUIGetMsg(1) ; Use advanced parameter to get array Switch $nMsg[1] ; check which GUI sent the message Case $hGUI1 Switch $nMsg[0] ; Now check for the messages for $hGUI1 Case $GUI_EVENT_CLOSE ; If we get the CLOSE message from this GUI - we exit <<<<<<<<<<<<<<< ExitLoop Case $useit GUICtrlSetState($useit, $GUI_DISABLE) gui2() Case $detect If WinExists(GUICtrlRead($progress)) Then GUICtrlSetData($status, "Fut!") Else GUICtrlSetData($status, "Nem Fut!") EndIf Case $exit For $i = 0 To 13 IniWrite($sIniFile, "Napló", $i, GUICtrlRead($aControlID[$i])) Next Exit Case $GUI_EVENT_CLOSE For $i = 0 To 13 IniWrite($sIniFile, "Napló", $i, GUICtrlRead($aControlID[$i])) Next Exit Case $btnStop _Check4Stop() Case $btnStart _Check4Start() EndSwitch ; parancsok If $Start = 1 Then If GUICtrlRead($Checkbox1) = 1 Then ; skillek, 1. Küldés $ism = GUICtrlRead($btnStart) If WinActive(GUICtrlRead($progress)) Then Send(GUICtrlRead($s1)) Sleep(GUICtrlRead($w1)) _HP() _Target() _Drop() _Delayer() EndIf EndIf EndIf Case $hGUI2 Switch $nMsg[0] ; Now check for the messages for $hGUI2 Case $GUI_EVENT_CLOSE ; If we get the CLOSE message from this GUI - we just delete the GUI <<<<<<<<<<<<<<< GUIDelete($hGUI2) GUICtrlSetState($useit, $GUI_ENABLE) EndSwitch EndSwitch WEnd EndFunc ;==>gui1 Link to comment Share on other sites More sharing options...
retaly Posted March 1, 2012 Author Share Posted March 1, 2012 (edited) plz help me if u understood my problem :S, Edited March 1, 2012 by retaly 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