MrVietA2 Posted September 23, 2011 Share Posted September 23, 2011 (edited) Hi All ! 1 - I create a Input with GuictrlcreateInput() and set some data for it, that data is some text ("Hello") Ex : $1 = GUICtrlCreateInput("Hello",200,100) I have a question for all of you : " How can I set the other data for $1 when I turn on the script ? " Ex : When I turn on the script in first time, the text will be "Hello" When I turn on the script again, the text will be "How are you ?" And again......, the text will be change to other text... 2 - I see it in other autoit program but I don't know how to do this : It like GuictrlcreateEdit but I can't delete the text in it, so what is this ? Please help me ! Thank you so much Edited September 23, 2011 by MrVietA2 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 23, 2011 Moderators Share Posted September 23, 2011 MrVietA2, Put the possible options into an array and then choose a random element when you start the script: #include <GUIConstantsEx.au3> Global $aInputs[3] = ["Hello", "How are you", "Pretty simple really!"] $hGUI = GUICreate("Test", 500, 500) $hInput = GUICtrlCreateInput($aInputs[Random(0, 2, 1)], 10, 10, 200, 20) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M23 MrVietA2 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...
MrVietA2 Posted September 23, 2011 Author Share Posted September 23, 2011 Thank you, I can understand how to do this now . Can you show me the question 2 ? Thanks Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 23, 2011 Moderators Share Posted September 23, 2011 MrVietA2, Just make the edit control read only. #include <GUIConstantsEx.au3> #include <EditConstants.au3> $hGUI = GUICreate("Test", 500, 500) $hEdit = GUICtrlCreateEdit("Try and delete me!", 10, 10, 200, 200, BitOr($GUI_SS_DEFAULT_EDIT, $ES_READONLY)) ; <<<<<<<<<<<<<<<< GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M23 MrVietA2 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...
MrVietA2 Posted September 23, 2011 Author Share Posted September 23, 2011 (edited) MrVietA2, Just make the edit control read only. #include <GUIConstantsEx.au3> #include <EditConstants.au3> $hGUI = GUICreate("Test", 500, 500) $hEdit = GUICtrlCreateEdit("Try and delete me!", 10, 10, 200, 200, BitOr($GUI_SS_DEFAULT_EDIT, $ES_READONLY)) ; <<<<<<<<<<<<<<<< GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M23 That is so good , thanks When I start a new topic, I have more question want to ask, so can I ask all question in this topic ? If ok then this is my question : - How can I change icon mouse when click on other different button ? It mean when I move the mouse to some button, the mouse icon will be change ! - What is difference between @cr and @crlf ? That is all of my question . Thanks ! Edited September 23, 2011 by MrVietA2 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 23, 2011 Moderators Share Posted September 23, 2011 MrVietA2, Ever thought of looking in the Help file for the answers to some of these simple questions before posting? #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $hButton_1 = GUICtrlCreateButton("Normal Cursor", 10, 10, 200, 30) $hButton_1 = GUICtrlCreateButton("Changed Cursor", 10, 50, 200, 30) GUICtrlSetCursor(-1, 5) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd@CRLF is the standard Windows End-Of-Line (EOL) code. You can also find @CR and @LF on their own - I seem to remember that one is the Mac standard EOL and the other the Unix one, but I cannot remember which way round it is. The codes date back to line printers: - CR = Carriage Return (return the print head to the left edge of the page)- LF = Line Feed (Move the paper up by one line) MS (DOS and Windows) decided to require both to signify EOL - Mac and Unix went with just the one, probably to save some space when storage was limited to tiny floppy disks.AutoIt will deal correctly with all 3 EOL versions - the only difference appears if you use StringSplit (look in the Help file to see why!) 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...
MrVietA2 Posted September 23, 2011 Author Share Posted September 23, 2011 That is useful, I will remember find anything in Help file before I start a new topic ! With GUICtrlSetCursor(), how can I set the different cursor for GUI is not exist in my computer ? Thank you so much Link to comment Share on other sites More sharing options...
MrVietA2 Posted September 24, 2011 Author Share Posted September 24, 2011 (edited) Hi all,Somebody help me with the question in #7 ? I have a question want to ask : I design 1 GUI with 1 button ( If R.click on button then show 1 msgbox(0,"Hello","How are you ?") ). When I complie then script, it make a exe file . I run this file : My exe file is show 2 icon in task bar when I press "Button", I want it show only 1 icon in taskbar when I press "Button" ( It still have 1 gui and 1 msgbox() ) . How can I do this ? Thanks ! Edited September 24, 2011 by MrVietA2 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 24, 2011 Moderators Share Posted September 24, 2011 MrVietA2,To hide the taskbar button for the MsgBox, just set the hwnd parameter: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $hButton = GUICtrlCreateButton("Test", 10, 10, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton MsgBox(0,"Hello","How are you ?", 0, $hGUI) EndSwitch WEndM23 MrVietA2 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...
MrVietA2 Posted September 24, 2011 Author Share Posted September 24, 2011 Thanks Melba23, so what about question in #7 ? Please help me, thanks Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 24, 2011 Moderators Share Posted September 24, 2011 MrVietA2, I have no idea about adding non-existent cursors, sorry. M23 MrVietA2 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...
MrVietA2 Posted September 24, 2011 Author Share Posted September 24, 2011 MrVietA2, I have no idea about adding non-existent cursors, sorry. M23 Oh, thanks so much ! Link to comment Share on other sites More sharing options...
MrVietA2 Posted September 24, 2011 Author Share Posted September 24, 2011 Oh, I have some question want to ask : I find #Obfuscator and how can I use it for my script ? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted September 25, 2011 Share Posted September 25, 2011 Oh, I have some question want to ask : I find #Obfuscator and how can I use it for my script ?Tools > Compile, or read helpfile. MrVietA2 1 .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
MrVietA2 Posted September 25, 2011 Author Share Posted September 25, 2011 My script is have about 2000 codes, when I comlie it to exe file I select "Complie with Oitions" . In "FileInstall compression", can I select "High or Highest" ? Do it affect my program ? Can you tell me ? Thanks ! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 25, 2011 Moderators Share Posted September 25, 2011 MrVietA2, Why not try compiling twice using a different option each time and see if you can determine the difference yourself? M23 MrVietA2 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...
MrVietA2 Posted September 25, 2011 Author Share Posted September 25, 2011 MrVietA2, Why not try compiling twice using a different option each time and see if you can determine the difference yourself? M23 I did, but I don't know do it affect my program ? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 25, 2011 Moderators Share Posted September 25, 2011 MrVietA2,"FileInstall compression"Do you use FileInstall in your script? 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...
MrVietA2 Posted September 25, 2011 Author Share Posted September 25, 2011 (edited) MrVietA2, Do you use FileInstall in your script? M23 Yes, I use FileInstall to add some text file, Ing file and dll file Oh I have 1 question also want to ask with GUICtrlcreateInput() : " I have 1 GUI, 1 Input and 1 button " Create", how can I set other text to Input when I press button " Create " "? Ex : #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $hInput = GUICtrlCreateInput("", 10, 10, 200, 20) $button = GuictrlcreateButton("Create",50,50,300,50) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd The text : "Hello" "How are you ?" "What is your name ?" When I press button button " Create " then it set random text to input ($hInput) . How can I do this ? Thanks Edited September 25, 2011 by MrVietA2 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 25, 2011 Moderators Share Posted September 25, 2011 MrVietA2,What do you think might be the difference between the 2 executables produced with "High/Highest" compression? Do you see any evidence of it? As to your new question, just modify what I posted in answer to the first post in this thread. M23P.S. Please stop quoting my posts back to me - I know what I said! 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...
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