Jump to content

just a quick one

Recommended Posts


I wrote this script to keep clicking down so that I can play the music with my guitar and not have to keep on stopping to press down, Im sure there is probably an even better way, but anyway, this is the second exit script that I have tried writing at the end, but it does not stop it running when im pressing exit

this is the other exit script I tried:

#include <msgboxconstants.au3>

;press Esc to terminate script, pause/break to "pause"

Global $g_bpaused = False

HotKeySet ( " {pause} " , "togglepause" )
HotKeySet ( " {ESC} " , "Terminate" )
HotKeySet ( " +!d" , "showMessage ") ; shift-alt-D

while 1
func Togglepause()
   $g_bpaused = Not $g_bpaused
   While $g_bpaused
      ToolTip( 'script is "paused" ' , 0, 0)
   ToolTip(" ")
EndFunc    ;==>Togglepause

Func Terminate( )
EndFunc    ;==>Terminate

Func showmessage ( )
   MsgBox($MB_systemmodal,  " " , "this is a message." )
   EndFunc   ;==>Showmessage


any ideas why it wont stop stop the script please?

i have been racing to tools and stop script as I dont seem to have the break button


Share this post

Link to post
Share on other sites

You need to use curly brackets i.e. HotKeySet("{ESC}", "close") not HotKeySet("(ESC)", "close"), it also needs to be set at the top of your script, + you need an EndFunc on Close().

Couple of alternative  methods, IE Scroll.

#include <IE.au3>
HotKeySet("{ESC}", "close")
Local $i = 0
Local $iDown = 200 ; Scroll down 200 Pixels

Local $oIE = _IECreate("https://tabs.ultimate-guitar.com/j/james_arthur/say_you_wont_let_go_ver3_crd.htm", 1)
AdlibRegister("_IEScroll", 4000)
While 1

Func _IEScroll()
    $oIE.document.parentwindow.scroll(0, $i)
    $i += $iDown

Func close ()

Notepad + Scroll.

#include <IE.au3>
#include <ScrollBarsConstants.au3>
#include <GuiEdit.au3>

HotKeySet("{ESC}", "close")

Global $oIEBrowse = _IECreate("https://tabs.ultimate-guitar.com/l/led_zeppelin/stairway_to_heaven_ver2_crd.htm", 1)
Global $oSong = _IEGetObjById($oIEBrowse, "cont")
    If @error Then Exit
Global $hWnd = WinWait("[CLASS:Notepad]", "", 10)
    ControlSetText($hWnd, "", "Edit1", $oSong.InnerText)
Global $hCtrl = ControlGetHandle($hWnd, "", "Edit1")
AdlibRegister("_ScrollText", 8000)

While 1

Func _ScrollText()
    _GUICtrlEdit_Scroll($hCtrl, $SB_PAGEDOWN)


Share this post

Link to post
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


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.