retaly Posted October 21, 2011 Author Share Posted October 21, 2011 (edited) ok i'am sorry, yeah i had this text, but another was forget, i found and fixed it Edited October 21, 2011 by retaly Link to comment Share on other sites More sharing options...
retaly Posted October 21, 2011 Author Share Posted October 21, 2011 (edited) this is my last big problem.. i hope, trying designing my gui, but at the momment doesnt work the close with X, and button doesnt change Start/pause if i use Opt("GuiOnEventMode", 1) if not use, coord doesnt work and exit working but start/pause doesnt, omg :S im not understand that programing language ( wanna to learn, plz heelp once more #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <TabConstants.au3> #include <GUIConstants.au3> #include <EzSkin.au3> Opt("GuiOnEventMode", 1) $EzGUI = EzSkinGUICreate("Tabbed Notebook Dialog", 656, 456) $EzIcon = EzSkinIcon($EzGUI) $PageControl1 = GUICtrlCreateTab(32, 32, 588, 416, $TCS_BUTTONS) $TabSheet1 = GUICtrlCreateTabItem("tab0") $x1 = GUICtrlCreateEdit("", 96, 56, 57, 17, BitOR($ES_CENTER, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $ES_NUMBER, $WS_BORDER), 0) GUICtrlSetData(-1, "0") $y1 = GUICtrlCreateEdit("", 192, 56, 57, 17, BitOR($ES_CENTER, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $ES_NUMBER, $WS_BORDER), 0) GUICtrlSetData(-1, "0") $Label1 = GUICtrlCreateLabel("y", 176, 56, 17, 17, BitOR($SS_CENTER, $WS_BORDER)) GUICtrlSetBkColor(-1, 0xFFFBF0) $Label2 = GUICtrlCreateLabel("x", 80, 56, 17, 17, BitOR($SS_CENTER, $WS_BORDER)) GUICtrlSetBkColor(-1, 0xFFFBF0) $Button1 = GUICtrlCreateButton("Definiálás", 256, 56, 75, 17) GUICtrlSetOnEvent(-1, "_Button1") $start = EzSkinButton("Start", 144, 296, 97, 25) GUICtrlSetOnEvent(-1, "_StartS") $nx2 = GUICtrlCreateLabel("x", 80, 80, 17, 17, BitOR($SS_CENTER, $WS_BORDER)) GUICtrlSetBkColor(-1, 0xFFFBF0) $x2 = GUICtrlCreateEdit("", 96, 80, 57, 17, BitOR($ES_CENTER, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $ES_NUMBER, $WS_BORDER), 0) GUICtrlSetData(-1, "0") $ny2 = GUICtrlCreateLabel("y", 176, 80, 17, 17, BitOR($SS_CENTER, $WS_BORDER)) GUICtrlSetBkColor(-1, 0xFFFBF0) $y2 = GUICtrlCreateEdit("", 192, 80, 57, 17, BitOR($ES_CENTER, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $ES_NUMBER, $WS_BORDER), 0) GUICtrlSetData(-1, "0") $Button2 = GUICtrlCreateButton("Definiálás", 256, 80, 75, 17) GUICtrlSetOnEvent(-1, "_Button2") GUICtrlSetFont(-1, 8, 400, 0, "Arial") $TabSheet2 = GUICtrlCreateTabItem("tab1") $dik = EzSkinButton("dik", 168, 144, 75, 25) GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) GUISetState(@SW_SHOW) GUISetState() HotKeySet("{ENTER}", "_End") HotKeySet("{DEL}", "_stop") HotKeySet("{HOME}", "_activate") Global $fRun = False $fRun1 = False $fRun2 = False While 1 EzSkinOver() $msg = GUIGetMsg() If $msg = $EzIcon[1] Then Exit If $msg = $EzIcon[2] Then GuiSetstate(@SW_MINIMIZE, $EzGUI) ;If $msg = $start Then MsgBox(64,"EzSkin", "The Skin is operating properly... Thanks ") If $msg = $dik Then MsgBox(64,"EzSkin", "The Skin is operating properly... Thanks ") If $fRun1 Then $aPos = MouseGetPos() GUICtrlSetData($x1, $aPos[0]) GUICtrlSetData($y1, $aPos[1]) EndIf If $fRun2 Then $aPos = MouseGetPos() GUICtrlSetData($x2, $aPos[0]) GUICtrlSetData($y2, $aPos[1]) EndIf Sleep(10) ; You need this to prevent 100% CPU usage WEnd Func _StartS() $fRun = Not $fRun If $fRun Then GUICtrlSetData($start, "Pause") Else GUICtrlSetData($start, "Start") EndIf EndFunc ;==>_StartS Func _Quit() Exit EndFunc ;==>_Quit Func _stop() $fRun = False GUICtrlSetData($start, "Start") EndFunc ;==>_stop Func _activate() WinActivate("Test") EndFunc ;==>_activate Func _End() $fRun1 = False $fRun2 = False EndFunc ;==>_End Func _Button1() $fRun1 = True EndFunc Func _Button2() $fRun2 = True EndFunc Edited October 21, 2011 by retaly Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 21, 2011 Moderators Share Posted October 21, 2011 retaly, Do you actually read the replies you get? Opt("GuiOnEventMode", 1) ... $msg = GUIGetMsg() If $msg = $EzIcon[1] Then Exit If $msg = $EzIcon[2] Then GUISetState(@SW_MINIMIZE, $EzGUI)What did I say a few posts ago? "You cannot use both OnEvent and MessageLoop modes at the same time" Your EzIcons will never be actioned as (taken directly from the Help file): "If the GUIOnEventMode option is set to 1 then the return from GUIGetMsg is always 0" Go and read the Help file under <GUI Reference - GUI Event Modes> and make sure you understand the difference between the 2 modes. 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 October 21, 2011 Author Share Posted October 21, 2011 remember.., sry :/ Link to comment Share on other sites More sharing options...
retaly Posted October 21, 2011 Author Share Posted October 21, 2011 im understood what did u say of "OnEvent and MessageLoop" but, i dont know what need to do, plz write me the full script well, i need a last example Link to comment Share on other sites More sharing options...
Developers Jos Posted October 21, 2011 Developers Share Posted October 21, 2011 plz write me the full script well,i need a last example want fries with that? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 21, 2011 Moderators Share Posted October 21, 2011 retaly, I already wrote you a script that has teh same functionality as that one which worked and I posted it above. I do not use EzSkin.au3 and so I have no idea how to use it in OnEvent mode. So, I suggest you either read the UDF function headers to find out how to do it yourself or post in the thread where you found it and ask the author. And I am not going to do either of those things for you. 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...
Moderators Melba23 Posted October 22, 2011 Moderators Share Posted October 22, 2011 (edited) retaly, Please do NOT send PMs asking for help - it is contrary to the Forum Rules: "Do not PM users asking for personal support. This is considered harassment. Instead post a topic in General Help & Support, that's what it's there for." I have already explained earlier in this thread that I do not use the EzSkin and so I had no idea how to use it in OnEvent mode. However, as you seem unwilling or unable to find out how to do it for yourself, I have looked into the UDF to find the solution for you. You need to do something like this:; Set OnEvent mode Opt("GuiOnEventMode", 1) ... ; Get the EzIcon return values $EzIcon = EzSkinIcon($EzGUI) ; Set events for them GUICtrlSetOnEvent($EzIcon[1], "_Close") GUICtrlSetOnEvent($EzIcon[2], "_Mini") ... ; Create functions to run when the events occur Func _Close() Exit EndFunc Func _Mini() GUISetState(@SW_MINIMIZE, $EzGUI) EndFuncPlease do not expect any more help on this - and do NOT PM me again. M23 Edit: Missed a "not". Edited October 22, 2011 by Melba23 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 October 22, 2011 Author Share Posted October 22, 2011 ok i'am sorry,thx very well 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