Global SetKeyDelay? Topic is solved
Global SetKeyDelay?
v2 is too fast! Need to slowdown each keypress. How to set a global value for it?
Either in my ahk-file or as a global setting for all ahk-files.
Either in my ahk-file or as a global setting for all ahk-files.
Re: Global SetKeyDelay?
Or.. maybe it is just one single paste for all?
Example:
Example:
Code: Select all
#HotIf WinActive("ahk_class BricscadMainWindow", )
^!5::Send("(cmd_setenv `"epcb_cmd`" `"PROJ_ANALYS`"){ENTER}"), Sleep(3000), Send("(cmd_setenv `"epcb_cmd`" `"PROJ_XREF`"){ENTER}")
Re: Global SetKeyDelay?
Code: Select all
#Requires AutoHotkey v2.0
SendMode 'Event'
Loop 10
Send A_Index ' '
Loop 200
Send 'x'
Input: This is the starting default used by all scripts. It uses the SendInput method for Send, SendText, Click, and MouseMove/Click/Drag.
Re: Global SetKeyDelay?
Thanks! Unsure how to use it? My file is as below. Worked fine for many years now (or the v1 version of it)
And I may explain little - I am using a programable mini-keyboard where one button is programmed to do like ^+D
And I may explain little - I am using a programable mini-keyboard where one button is programmed to do like ^+D
Code: Select all
; Exempel på hotstring. Nertryckning av tangenterna krävs, det går inte att klistra in.
;:c*:ftw::Free the whales
;Exempel
;^F9::Send ('mintext')
F1::Send("{ctrl down}c{ctrl up}")
^'::A_Clipboard := A_Clipboard ; Convert any copied files, HTML, or other formatted text to plain text
F4::Send("{ctrl down}v{ctrl up}")
^5::WinMinimize("ahk_class BricscadMainWindow")
^6::WinRestore("ahk_class BricscadMainWindow")
^F1::Send("*.*md;*.bak;*.lck;felrapport;*.scr;*.db;*.log;*.old*;*.tmp;*.$*mdb;Preview")
^F9::Send("{F2}{Del}{down}")
^+T::Send(A_YYYY "-" A_MM "-" A_DD " " A_Hour ":" A_Min "{Space}")
^+D::Send(A_YYYY "-" A_MM "-" A_DD "{Space}")
; Kopiera symbol, triggas av musknapp G6, funkar bara i Bricscad
#HotIf WinActive("ahk_class BricscadMainWindow", )
^!1::Send("(if (elpr_copyss (ssget `"I`")) (elpr_snddb (ssget `"P`") `"BLK_COPY`")){ENTER}")
; Kopiera symboler till urklipp 0,0, funkar bara i Bricscad
#HotIf WinActive("ahk_class BricscadMainWindow", )
^!2::Send("(if (elpr_selbase) (elpr_movcpy 3 (ssget `"P`"))){ENTER}0,0{ENTER}")
; Klistrar in symboler från urklipp 0,0, funkar bara i Bricscad
#HotIf WinActive("ahk_class BricscadMainWindow", )
^!3::Send("(if (elpr_movcpy 2) (progn (elpr_explode (ssget `"L`")) (elpr_snddb (ssget `"P`") `"BLK_AEDIT`"))){ENTER}0,0{ENTER}")
; Multikopiera symbol, funkar bara i Bricscad
#HotIf WinActive("ahk_class BricscadMainWindow", )
^!4::Send("(load `"elpratte`") (elp_attecopy){ENTER}")
; Analys+korsref, funkar bara i Bricscad
#HotIf WinActive("ahk_class BricscadMainWindow", )
^!5::Send("(cmd_setenv `"epcb_cmd`" `"PROJ_ANALYS`"){ENTER}"), Sleep(3000), Send("(cmd_setenv `"epcb_cmd`" `"PROJ_XREF`"){ENTER}")
Last edited by Mikael63 on 15 Mar 2024, 10:35, edited 1 time in total.
Re: Global SetKeyDelay? Topic is solved
You take the first two lines of my script, and make them the first two lines of your script.
Re: Global SetKeyDelay?
I thought I was the only one writing AHK scripts for "Elprocad"
Can't seem to DM you here on the board., but feel free to get in touch if you wanna discuss more AHK and Elprocad/Bricscad customisations
Can't seem to DM you here on the board., but feel free to get in touch if you wanna discuss more AHK and Elprocad/Bricscad customisations