yousefsamy Posted June 29, 2014 Share Posted June 29, 2014 here when i add a picture to background i can see the button but i can't use it ... #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 610, 434, 192, 124) $Pic1 = GUICtrlCreatePic("C:\Users\The-Wise\Desktop\صلاتى\simple.jpg", 0, 0, 609, 433) $Button1 = GUICtrlCreateButton("Button1", 48, 112, 193, 113) $Button2 = GUICtrlCreateButton("Button2", 240, 224, 193, 113) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(0,"","1") Case $Button2 MsgBox(0,"","2") EndSwitch WEnd Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 29, 2014 Moderators Share Posted June 29, 2014 yousefsamy,I told you the other day to read the Help file. Look at the "Remarks" section for GUICtrlCreatePic - the 7th paragraph is the one you need. Post again if you still need help after reading that paragraph - but post the contents as well so I can be sure you have actually read it. 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...
yousefsamy Posted June 29, 2014 Author Share Posted June 29, 2014 i found it here : $Pic1 = GUICtrlCreatePic("C:\Users\The-Wise\Desktop\صلاتى\simple.jpg", 0, 0, 609, 433,$SS_BITMAP) is it right like this .... =--------------------- i have another question can i make a clock in input !! here is my code #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Date.au3> Local Const $time = @HOUR&":"&@MIN&":"&@SEC $Form1 = GUICreate("Ramadan", 200, 200, -1, -1) $Input1 = GUICtrlCreateInput($time, 64, 32, 121, 28) GUICtrlSetFont(-1, 12, 400, 0, "Neo Tech Alt Medium") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
dbzfanatic Posted June 30, 2014 Share Posted June 30, 2014 What do you mean make a clock in the input? Like show the date/time in the input box or use a timer to see how long something has been since input was issued? Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 30, 2014 Moderators Share Posted June 30, 2014 yousefsamy ,That is certainly one way to solve the problem - by removing the $SS_NOTIFY style you do not have overlapping active controls and so AutoIt knows what to action. The more usual way - as explained in that para - is to disable the Pic control. But both have the same result. 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...
yousefsamy Posted June 30, 2014 Author Share Posted June 30, 2014 dbzfanatic i mean i want to make a dynamic changes in input box to be like the original clock Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 30, 2014 Moderators Share Posted June 30, 2014 yousefsamy,Use GUICtrlSetData and the Time And Date macros such as @Year. M23 yousefsamy 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...
yousefsamy Posted June 30, 2014 Author Share Posted June 30, 2014 i want to make it change it self every second #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Date.au3> $time = @HOUR&":"&@MIN&":"&@SEC $Form1 = GUICreate("Ramadan", 200, 200, -1, -1) $Input1 = GUICtrlCreateInput("", 64, 32, 121, 28,$ES_READONLY) GUICtrlSetData($Input1,$time) GUICtrlSetFont(-1, 12, 400, 0, "Neo Tech Alt Medium") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 30, 2014 Moderators Share Posted June 30, 2014 yousefsamy,And which of those macros do you suppose changes every second? Just look for the change in the idle loop and rewrite the content when necessary. 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...
yousefsamy Posted June 30, 2014 Author Share Posted June 30, 2014 sorry bro i tried many times but i still cant reach what i want Link to comment Share on other sites More sharing options...
Moderators Solution Melba23 Posted June 30, 2014 Moderators Solution Share Posted June 30, 2014 yousefsamy,What I suggested was this:#include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $iCurrentSec = -1 $Form1 = GUICreate("Ramadan", 200, 200, -1, -1) $Input1 = GUICtrlCreateInput("", 64, 32, 121, 28,$ES_READONLY) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch If @SEC <> $iCurrentSec Then ; Wait for the change of second $iCurrentSec = @SEC GUICtrlSetData($Input1, @HOUR & ":" & @MIN & ":" & @Sec) EndIf WEndM23 yousefsamy 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...
yousefsamy Posted June 30, 2014 Author Share Posted June 30, 2014 here is some things i can't understand like : <> <-- this signs $iCurrentSec = -1 <=--- and this Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 30, 2014 Moderators Share Posted June 30, 2014 yousefsamy,As I tell you so often, the Help file is your friend - look at the Operators page to understand <> and all other signs in AutoIt. We set $iCurrentSec to -1 at the start so that the first time we check the current value in @Sec it will always be different and so the update is triggered. Clear now? 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...
yousefsamy Posted June 30, 2014 Author Share Posted June 30, 2014 (edited) it's clear because sec will never be -1 you are the best bro but if i change it with 1 it will be work i tried that ?? please can you try this code and tell me your opinion #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Date.au3> #include <sendmessage.au3> Local Const $move= 0xF012 $Form1 = GUICreate("Ramadan", 200, 200, -1, -1,$WS_SIZEBOX,$WS_EX_WINDOWEDGE) $Input1 = GUICtrlCreateInput("", 64, 32, 121, 28,$ES_READONLY,$WS_TABSTOP) GUICtrlSetFont(-1, 12, 400, 0, "Neo Tech Alt Medium") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN _SendMessage($Form1,$WM_SYSCOMMAND,$move) EndSwitch GUICtrlSetData($Input1, @HOUR & ":" & @MIN & ":" & @Sec) WEnd Edited June 30, 2014 by yousefsamy Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 30, 2014 Moderators Share Posted June 30, 2014 yousefsamy, but if i change it with 1 it will be workHave you tried to see? Just to be clear, it will work with any initial value - all you risk is having to wait for 1 second for the clock to start if you happen to choose the value of the current second as you start the script. M23P.S. And please stop calling me "bro". 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...
yousefsamy Posted June 30, 2014 Author Share Posted June 30, 2014 okay but can i make an alarm with this code ?? #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Date.au3> #include <sendmessage.au3> Local Const $move= 0xF012 $Form1 = GUICreate("Ramadan", 200, 200, -1, -1,$WS_SIZEBOX,$WS_EX_WINDOWEDGE) $Input1 = GUICtrlCreateInput("", 64, 32, 121, 28,$ES_READONLY,$WS_TABSTOP) GUICtrlSetFont(-1, 12, 400, 0, "Neo Tech Alt Medium") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN _SendMessage($Form1,$WM_SYSCOMMAND,$move) EndSwitch $alarm = GUICtrlSetData($Input1, @HOUR & ":" & @MIN & ":" & @Sec) If $alarm = "22:53:30" Then MsgBox(0,"","") EndIf WEnd Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 30, 2014 Moderators Share Posted June 30, 2014 yousefsamy,What do you think is in the $alarm variable? It is certainly not what you think. What does the Help file say is returned by the GUICtrlSetData function? Not the value you have just set, that is for sure! Answer me that and we will discuss how you might get your alarm to work. M23P.S. And what happened to the once-per-second update code? You are very likely to get flickering of the input content if you update it on every pass through the idle loop. 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...
yousefsamy Posted June 30, 2014 Author Share Posted June 30, 2014 and what about this !! #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Date.au3> #include <sendmessage.au3> Local Const $move= 0xF012 $Form1 = GUICreate("Ramadan", 200, 200, -1, -1,$WS_SIZEBOX,$WS_EX_WINDOWEDGE) $Input1 = GUICtrlCreateInput("", 64, 32, 121, 28,$ES_READONLY,$WS_TABSTOP) GUICtrlSetFont(-1, 12, 400, 0, "Neo Tech Alt Medium") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN _SendMessage($Form1,$WM_SYSCOMMAND,$move) EndSwitch $alarm = GUICtrlSetData($Input1, @HOUR & ":" & @MIN & ":" & @Sec) $time = GUICtrlRead($Input1) If $time = "23:09:00" Then MsgBox(0,"","") EndIf WEnd Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 30, 2014 Moderators Share Posted June 30, 2014 yousefsamy,That should work - although I would do it this way:$sTime = @HOUR & ":" & @MIN & ":" & @Sec GUICtrlSetData($Input1, $sTime) If $sTime = "22:54:00" Then MsgBox(0,"","") EndIfM23 yousefsamy 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...
yousefsamy Posted June 30, 2014 Author Share Posted June 30, 2014 (edited) Thnx alot ,, Edited June 30, 2014 by yousefsamy 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