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 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.