warrus Posted January 7, 2016 Posted January 7, 2016 I was a novice , I want to create a GUI with buttons you need to press the button when the GUI did not disappear , please help 123.au3
warrus Posted January 7, 2016 Author Posted January 7, 2016 #include <ButtonConstants.au3>#include <GUIConstantsEx.au3>#include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=$Form1 = GUICreate("Панель управления ОТС", 615, 438, 224, 123)$Button1 = GUICtrlCreateButton("интра", 16, 24, 201, 25)$Button2 = GUICtrlCreateButton("Button1", 16, 72, 201, 25)$Button3 = GUICtrlCreateButton("Button1", 16, 120, 201, 25)$Button4 = GUICtrlCreateButton("Button1", 16, 168, 201, 25)$Button5 = GUICtrlCreateButton("Button1", 16, 216, 201, 25)$Button6 = GUICtrlCreateButton("Button1", 16, 264, 201, 25)GUISetState(@SW_SHOW)#EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button3 EndSwitchWEnd I want to do when you click on the button? exe file run admissible or being downloaded site
careca Posted January 7, 2016 Posted January 7, 2016 (edited) #Include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("?????? ?????????? ???", 615, 438, 224, 123) $Button1 = GUICtrlCreateButton("?????", 16, 24, 201, 25) $Button2 = GUICtrlCreateButton("Button2", 16, 72, 201, 25) $Button3 = GUICtrlCreateButton("Button3", 16, 120, 201, 25) $Button4 = GUICtrlCreateButton("Button4", 16, 168, 201, 25) $Button5 = GUICtrlCreateButton("Button5", 16, 216, 201, 25) $Button6 = GUICtrlCreateButton("Button6", 16, 264, 201, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run('Something.exe') ConsoleWrite('Something.exe ' & @MSEC & @CRLF) Case $Button2 Run('C:\Program Files (x86)\Mozilla Firefox\firefox.exe www.google.com') ConsoleWrite('A site ' & @MSEC & @CRLF) Case $Button3 Run('AnotherSomething.exe') EndSwitch WEndI think you get the picture Edited January 7, 2016 by careca Typo warrus 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
warrus Posted January 7, 2016 Author Posted January 7, 2016 #Include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("?????? ?????????? ???", 615, 438, 224, 123) $Button1 = GUICtrlCreateButton("?????", 16, 24, 201, 25) $Button2 = GUICtrlCreateButton("Button2", 16, 72, 201, 25) $Button3 = GUICtrlCreateButton("Button3", 16, 120, 201, 25) $Button4 = GUICtrlCreateButton("Button4", 16, 168, 201, 25) $Button5 = GUICtrlCreateButton("Button5", 16, 216, 201, 25) $Button6 = GUICtrlCreateButton("Button6", 16, 264, 201, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run('Something.exe') ConsoleWrite('Something.exe ' & @MSEC & @CRLF) Case $Button2 Run('C:\Program Files (x86)\Mozilla Firefox\firefox.exe www.google.com') ConsoleWrite('A site ' & @MSEC & @CRLF) Case $Button3 Run('AnotherSomething.exe') EndSwitch WEndI think you get the pictureThe friend you are my savior, our heartfelt thanks to you, Happy New Year !!!
warrus Posted January 7, 2016 Author Posted January 7, 2016 #Include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("ОТС", 615, 438, 224, 123) $Button1 = GUICtrlCreateButton("Интра", 16, 24, 201, 25) $Button2 = GUICtrlCreateButton("Button2", 16, 72, 201, 25) $Button3 = GUICtrlCreateButton("Button3", 16, 120, 201, 25) $Button4 = GUICtrlCreateButton("Button4", 16, 168, 201, 25) $Button5 = GUICtrlCreateButton("Button5", 16, 216, 201, 25) $Button6 = GUICtrlCreateButton("Button6", 16, 264, 201, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run('C:\Users\ruslan\Desktop\autoit\444.xlsx') ConsoleWrite('C:\Users\ruslan\Desktop\autoit\444.xlsx ' & @MSEC & @CRLF) Case $Button2 Run('C:\Program Files (x86)\Internet Explorer\iexplore.exe www.google.com') ConsoleWrite('A site ' & @MSEC & @CRLF) Case $Button3 Run('AnotherSomething.exe') Case $Button4 Run('AnotherSomething.exe') Case $Button5 Run('AnotherSomething.exe') EndSwitch WEndRun('C:\Users\ruslan\Desktop\autoit\444.xlsx') ConsoleWrite('C:\Users\ruslan\Desktop\autoit\444.xlsx ' & @MSEC & @CRLF) can`t run the file exel, can be an example , please
careca Posted January 7, 2016 Posted January 7, 2016 (edited) Hi, try to remove the space after the filenameautoit\444.xlsx ' &autoit\444.xlsx' &If it doesn't run like that you probably have to run excel with import parameter as stated HEREexcel.exe "c:\My Folder\book1.xlsx"If the excel file is in the same folder as the script:Run('Excel.exe '&'"'&@ScriptDir&'\444.xlsx"') ;If still doesn't work, you should include the path to the Excel exe. Run('C:\programfiles\officeblahblah\Excel.exe '&'"'&@ScriptDir&'\444.xlsx"') Edited January 7, 2016 by careca warrus 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
warrus Posted January 7, 2016 Author Posted January 7, 2016 Thank you very much this way of working that's Run ('C: \ Program Files (x86) \ Microsoft Office \ Office14 \ Excel.exe' & '"' & @ ScriptDir & '\ 444.xlsx"') and even a little unclear to me why this line ? ConsoleWrite ('A site' &MSEC &CRLF)
careca Posted January 7, 2016 Posted January 7, 2016 ConsoleWrite lines are only to show information in the autoit wrapper/output, it's like messagebox, used for debug, you can delete all ConsoleWrite lines. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
warrus Posted January 7, 2016 Author Posted January 7, 2016 how to make a background in the graphical interface , that does not work $Form2 = GuiCtrlCreatePic("logo.png",120,100) expandcollapse popup#Include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Excel.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("ОТС", 615, 438, 224, 123) $Form2 = GuiCtrlCreatePic("logo.png",120,100) $Button1 = GUICtrlCreateButton("Интра", 16, 24, 201, 25) $Button2 = GUICtrlCreateButton("Button2", 16, 72, 201, 25) $Button3 = GUICtrlCreateButton("Button3", 16, 120, 201, 25) $Button4 = GUICtrlCreateButton("Button4", 16, 168, 201, 25) $Button5 = GUICtrlCreateButton("Button5", 16, 216, 201, 25) $Button6 = GUICtrlCreateButton("Button6", 16, 264, 201, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run('C:\Program Files (x86)\Microsoft Office\Office14\Excel.exe '&'"'&@ScriptDir&'\444.xlsx"') ConsoleWrite('excel ' & @MSEC & @CRLF) Case $Button2 Run('C:\Program Files (x86)\Internet Explorer\iexplore.exe www.google.com') ConsoleWrite('A site ' & @MSEC & @CRLF) Case $Button3 Run('AnotherSomething.exe') Case $Button4 Run('AnotherSomething.exe') Case $Button5 Run('AnotherSomething.exe') EndSwitch WEnd$Form1 = GUICreate("ОТС", 615, 438, 224, 123) $Form2 = GuiCtrlCreatePic("logo.png",120,100)
careca Posted January 7, 2016 Posted January 7, 2016 Put$Form2 = GuiCtrlCreatePic("ABC.JPG",10,10, 500, 500) ;BMP JPG or GIF not animatedafter$Form1 = GUICreate("?????? ?????????? ???", 615, 438, 224, 123) warrus 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
warrus Posted January 7, 2016 Author Posted January 7, 2016 understood, in reference autoit on this team , supported formats include BMP, JPG, GIF ( no animation ) . Thank you
warrus Posted January 7, 2016 Author Posted January 7, 2016 Is it possible to somehow make to the Picture ?
Moderators JLogan3o13 Posted January 7, 2016 Moderators Posted January 7, 2016 @warrus in the future please learn how to use the Edit feature rather than three posts in quick succession, and follow the forum etiquette of not bumping your threads without waiting 24 hours. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
careca Posted January 7, 2016 Posted January 7, 2016 I didn't get your question, what do you mean Is it possible to somehow make to the Picture ?make what to the picture? Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
warrus Posted January 8, 2016 Author Posted January 8, 2016 @warrus in the future please learn how to use the Edit feature rather than three posts in quick succession, and follow the forum etiquette of not bumping your threads without waiting 24 hours.Good
warrus Posted January 8, 2016 Author Posted January 8, 2016 I didn't get your question, what do you meanmake what to the picture?Hi , I have figured out with images
careca Posted January 8, 2016 Posted January 8, 2016 huh, so everything solved?best regards. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
warrus Posted January 9, 2016 Author Posted January 9, 2016 Hello there was a question , you need to file my script was copied to a folder of the script regardless of the location of the script#Include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("GPU", 250, 250, 224, 123) $Form2 = GuiCtrlCreatePic("logo.jpg",100,10,45,38) $Form3 = GUICtrlCreateLabel("Нажмите Read на эталонной машине:",17,55,300,15) $Form4 = GUICtrlCreateLabel("Нажмите Write на целевом ПК:",17,105,300,15) $Button1 = GUICtrlCreateButton("Read",16, 74, 200, 25) $Button2 = GUICtrlCreateButton("Write", 16, 122, 201, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run('C:\Users\ruslan\Desktop\Новая папка\gpuread.bat ') ConsoleWrite('excel ' & @MSEC & @CRLF) Case $Button2 Run('C:\Users\ruslan\Desktop\Новая папка\gpwrite.bat') ConsoleWrite('A site ' & @MSEC & @CRLF) EndSwitch WEndIt is necessary that the file c: \ security_settings.inf Copy to Folder script Новая папка.rar
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