Jump to content

r2dak

Active Members
  • Posts

    20
  • Joined

  • Last visited

Reputation Activity

  1. Like
    r2dak reacted to BrewManNH in VBScript to AutoIt Converter   
    This script is almost 8 years old, the language has changed in that time. RunErrorsFatal has been removed from the options, you need to delete that line.
  2. Like
    r2dak reacted to johnmcloud in how can i run this via auto it   
    Read the help for ShellExecute or Run
    If you have problem, just say
  3. Like
    r2dak reacted to telmob in Making my program Appear in middle of the screen   
    ahahah, you're welcome. but my name is Telmo
  4. Like
    r2dak reacted to hannes08 in Making my program Appear in middle of the screen   
    Or:

    $Form = GUICreate("GUI", 280, 168, -1, -1)
  5. Like
    r2dak reacted to telmob in Making my program Appear in middle of the screen   
    try something like this:


    $Formwidth = 280
    $Formheight = 168
    $Form = GUICreate("GUI", 280, 168, @DesktopWidth/2 - $Formwidth/2, @DesktopHeight/2 - $Formheight/2)
  6. Like
    r2dak reacted to mihaibr in how to let a user write a message and then save it to a file   
    ok


    $GUI = GUICreate("Form1", 307, 439)
    Will create a window with the title Form1 that has 307pixels width and 439pixels height


    $Label1 = GUICtrlCreateLabel("Message:", 8, 8, 50, 17)
    Will create a static Label control ,with the text "Message:",with left coordonate 8 and the right coordonate 8,width 50 pixels and height 17

    $TextEdit = GUICtrlCreateEdit("", 8, 32, 289, 369)
    Will create an Edit control,with left 8px,top 32px,width 289px and height 369px

    $SaveButton = GUICtrlCreateButton("Save", 112, 408, 75, 25)
    Will create a button with the text "Save", left 112px,top 408px,width 75px and height 25px

    GUISetState(@SW_SHOW)
    Will set the GUI state as "Show"

    $file=FileOpen("msg.txt",2)
    FileOpen opens a text file for reading or writing.


    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case -3 ;$GUI_EVENT_CLOSE
    Exit
    Case $SaveButton
    $data=GUICtrlRead($TextEdit)
    FileWrite($file,$data)
    FileClose($file)
    MsgBox(64, "Thank you","thanks we will respond soon")
    Exit
    EndSwitch
    Sleep(10)
    WEnd
    This is the main loop of the program

    $nMsg = GUIGetMsg()
    Polls the GUI to see if any events have occurred.

    Case -3 ;$GUI_EVENT_CLOSE
    Exit
    Check if the "x" (close) button is pressend and close the program


    Case $SaveButton
    $data=GUICtrlRead($TextEdit)
    FileWrite($file,$data)
    FileClose($file)
    MsgBox(64, "Thank you","thanks we will respond soon")
    Exit
    Check if the "Save" button is pressed and then save the read the text from the Edit control($TextEdit) and save it into $data
    Then using FileWrite he write the $data into the file
    Then shows the MessageBox and exit
    Hope you understant something
    Sorry for my bad english.
    Here you can find all functions: http://www.autoitscript.com/autoit3/docs/functions.htm
    Here is the documentation: http://www.autoitscript.com/autoit3/docs/
×
×
  • Create New...