Jump to content

Help me find the error GUI


warrus
 Share

Recommended Posts

  1. #include <ButtonConstants.au3>
  2. #include <GUIConstantsEx.au3>
  3. #include <WindowsConstants.au3>
  4.  
  5. #Region ### START Koda GUI section ### Form=
  6. $Form1 = GUICreate("Панель управления ОТС", 615, 438, 224, 123)
  7. $Button1 = GUICtrlCreateButton("интра", 16, 24, 201, 25)
  8. $Button2 = GUICtrlCreateButton("Button1", 16, 72, 201, 25)
  9. $Button3 = GUICtrlCreateButton("Button1", 16, 120, 201, 25)
  10. $Button4 = GUICtrlCreateButton("Button1", 16, 168, 201, 25)
  11. $Button5 = GUICtrlCreateButton("Button1", 16, 216, 201, 25)
  12. $Button6 = GUICtrlCreateButton("Button1", 16, 264, 201, 25)
  13. GUISetState(@SW_SHOW)
  14. #EndRegion ### END Koda GUI section ###
  15.  
  16.  
  17. While 1
  18.     $nMsg = GUIGetMsg()
  19.     Switch $nMsg
  20.         Case $GUI_EVENT_CLOSE
  21.             Exit
  22.  
  23.         Case $Button3
  24.     EndSwitch
  25. WEnd
 
 
 
I want to do when you click on the button? exe file run admissible 
or being downloaded site
Link to comment
Share on other sites

#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
WEnd

I think you get the picture

Edited by careca
Typo
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

Link to comment
Share on other sites

#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
WEnd

I think you get the picture

The friend you are my savior, our heartfelt thanks to you, Happy New Year !!!
Link to comment
Share on other sites

#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
WEnd
Run('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
Link to comment
Share on other sites

Hi, try to remove the space after the filename

autoit\444.xlsx ' &
autoit\444.xlsx' &

If it doesn't run like that you probably have to run excel with import parameter as stated HERE

excel.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 by careca
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

Link to comment
Share on other sites

 
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)
Link to comment
Share on other sites

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

Link to comment
Share on other sites

 
how to make a background in the graphical interface , that does not work $Form2 = GuiCtrlCreatePic("logo.png",120,100)
 
#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)
 
Link to comment
Share on other sites

Put
$Form2 = GuiCtrlCreatePic("ABC.JPG",10,10, 500, 500) ;BMP JPG or GIF not animated

after

$Form1 = GUICreate("?????? ?????????? ???", 615, 438, 224, 123)

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

Link to comment
Share on other sites

  • Moderators

@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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
WEnd
It is necessary that the file c: \ security_settings.inf Copy to Folder script

Новая папка.rar

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...