Advertisement
sashaatx

Untitled

Aug 11th, 2023
1,550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #Requires Autohotkey v2
  3. ;AutoGUI 2.5.8 creator: Alguimist autohotkey.com/boards/viewtopic.php?f=64&t=89901
  4. ;AHKv2converter creator: github.com/mmikeww/AHK-v2-script-converter
  5. ;Easy_AutoGUI_for_AHKv2 github.com/samfisherirl/Easy-Auto-GUI-for-AHK-v2
  6.  
  7. myGuiObj := myClass.UI()
  8. ; myGuiObj.Destroy()
  9.  
  10. class myClass
  11. {
  12.     static UI()
  13.     {
  14.         myGUI := Gui()
  15.         ogcButtonOK := myGui.Add("Button", "x8 y8 w80 h23", "&OK")
  16.         ogcButtonOK.OnEvent("Click", OnEventHandler)
  17.         myGui.OnEvent('Close', (*) => ExitApp())
  18.         myGui.Title := "Window"
  19.         myGui.Show("w120 h46")
  20.                    
  21.         OnEventHandler(*)
  22.         {
  23.             ToolTip("Click! This is a sample action.`n"
  24.             . "Active GUI element values include:`n"  
  25.             . "ogcButtonOK => " ogcButtonOK.Text "`n", 77, 277)
  26.             SetTimer () => ToolTip(), -3000 ; tooltip timer
  27.         }
  28.         return myGui
  29.     }
  30. }
  31.  
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement