Why is my hotkeys/hotstrings beeing "blocked"

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
burton666
Posts: 49
Joined: 09 Dec 2014, 15:26

Why is my hotkeys/hotstrings beeing "blocked"

01 Jul 2016, 06:32

I have made this script but have some problems using it.

Code: Select all

#include Hotstring.ahk 
#include FileTail.ahk
#SingleInstance, force
#Persistent
#NoEnv
SetBatchLines, -1
SendMode, Input
SetKeyDelay, -1

Space::
sendInput ^g{enter 2}
return

Tab:: 
sendinput ^s{enter}
return

;-----Dynamic Hotstrings---------------
; download it from here https://github.com/menixator/ahk-repo/blob/master/Hotstring/Hotstring.ahk


Hotstring("([A-O]{2})(\d)(\d)([012])\s","expand2",3)

Hotstring("(MAX|FRASSE)(\d)(\d)\s","expand1",3)

Hotstring("(\b[A-O])(\d)(\d)([012])\s","expand3",3)

Hotstring("(FRASSE)(\d)(\d)([12])\s","expand4",3)

Hotstring("(\b\d{2,3})\s","expand5",3)

return
;-----Hotstrings---------------------------------

 
;----------Locators-----

:c:IN::INLAST{ENTER}INLAST...{ENTER}^kBOX{ENTER}
:c:DIR::DIRECT{ENTER}DIRECT...{ENTER}^kBOX{ENTER}

;----------Articles-----

::401102::10003621
::2CUP::30184628
::4CUP::30184629
::BAG::30183524
::BAG2::30183713
::BOX::^kBOX{ENTER}
::655104::30140406
::655105::30140162
::711182::10003563
::711195::10003568

;-----Hotkeys-------------------------------------



^f9::
MsgBox, % FileTail("c:\test\test.log", 14)
return

^f8::
placeholder = % FileTail("c:\test\test.log", 2)
IfInString, placeholder, Sub Transfer
    MsgBox, Found

else
    MsgBox, Not found
return


^F10::
InputBox, Artnr , Flytta artiklar, Vilken artikel vill du flytta?
InputBox, Antal, Antal, Hur många?
return


F1::
send %Temp_art%{ENTER}
return

F4::
send {down}%Artnr%{enter}
sleep 200
send INLAST{enter}INLAST...{enter}
sleep 200
send ^kBOX{enter}%Antal%{enter}
return

The Dynamic hotstring-part seems to block my other hotkeys. And if I put my regular hotkeys on top the dynamic hotstrings stop wotking.

The strange part is that if I put a hotkey using space under the dynamic hotstrings it does not work, but if I make the hotkey with ^Space:: it works.
Guest

Re: Why is my hotkeys/hotstrings beeing "blocked"

01 Jul 2016, 08:26

Your space & tab hotkeys need to be BELOW your hotstrings function calls, because of your current placement the hotstrings functions are never executed and therefore the hotstrings are not setup.
See https://autohotkey.com/docs/Scripts.htm#auto for reference.
burton666
Posts: 49
Joined: 09 Dec 2014, 15:26

Re: Why is my hotkeys/hotstrings beeing "blocked"

01 Jul 2016, 13:12

I tried that to, but If I place them under the dynamic hotstrings then the hotkeys does not work correctly. For example nothing happens when I trie to use "Space::" but if I use "^Space::" it works. Same with the other keys, "F4::" does not work but "^F4::" works

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: AlFlo, luvini, peter_ahk and 174 guests