Advertisement
Najeebsk

LIVE-RUN-SAVE.ahk

Aug 4th, 2022 (edited)
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; <COMPILER: v1.1.32.00>
  2. ;#Warn
  3. #NoEnv
  4. #SingleInstance, Force
  5. SendMode Input
  6. SetWorkingDir %A_Desktop%
  7. ;==========================
  8. Gui +Resize ;+MinSize200x100
  9. Gui Margin, 0, 0
  10. Gui, Font, S12 CDefault Bold, Times New Roman
  11.  
  12. If FileExist("%A_Desktop%\AHKTest.ahk")
  13. {
  14.     Loop, read, %A_Desktop%\AHKTest.ahk
  15.     {
  16.         FileReadLine, Lines, %A_Desktop%\AHKTest.ahk, %A_Index%
  17.     }
  18.                 Gui, Add, Edit, vMainEdit WantTab W800 R10 gWrite, %Lines%
  19.  
  20. }
  21. else
  22. {
  23.                 Gui, Add, Edit, vMainEdit WantTab W800 R10 gWrite, %MainEdit%
  24.  
  25. }
  26.  
  27. Gui, Show, w600 h600 Center, RealTime Najeeb AHK Code Tester
  28. Return
  29. GuiSize:
  30.     if (ErrorLevel = 1)
  31.         return
  32.     NewWidth := A_GuiWidth
  33.     NewHeight := A_GuiHeight
  34.     GuiControl, Move, MainEdit, W%NewWidth% H%NewHeight%
  35. return
  36. Write:
  37.    Gui, Submit, NoHide
  38.     FileDelete, %A_Desktop%\AHKTest.ahk
  39.     Fileappend, %MainEdit%, %A_Desktop%\AHKTest.ahk
  40.     RUN, %A_Desktop%\AHKTest.ahk
  41. Return
  42.  
  43. GuiEscape:
  44.     GuiClose:
  45.         ExitApp
  46. ;==========================
  47. #R::Reload  ;<--  ~ Reload Script ~
  48. #S::Suspend ;<--  ~ Suspend Script ~
  49. #P::Pause   ;<--  ~ Pause Script ~
  50. #M::WinMinimize, ;<--  ~ Minimize Script ~
  51. ESC::ExitApp     ;<--  ~ Exit Script ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement