Search found 791 matches

by GEV
15 Sep 2019, 00:21
Forum: Ask For Help
Topic: Hotstring
Replies: 15
Views: 956

Re: Hotstring

You have to use the file's name + extension in

Code: Select all

FileRead, Allfile, the_name_of_your_file.txt
if the file is in the script's working directory

or the full path of the file if it's in another directory.
by GEV
12 Sep 2019, 04:15
Forum: Ask For Help
Topic: how to combine mouse get post and r button as triggers Topic is solved
Replies: 8
Views: 498

Re: how to combine mouse get post and r button as triggers Topic is solved

~rbutton:: ; the tilde prefix (~) prevents AHK from blocking the key-down/up events CoordMode, Mouse, Screen ; sets the coordinate mode for the commands MouseGetPos and Click to be relative to the screen mousegetpos, x, y ; retrieves the current position of the mouse cursor if (x < 1000) click, 250...
by GEV
12 Sep 2019, 01:48
Forum: Ask For Help
Topic: Hotstring
Replies: 15
Views: 956

Re: Hotstring

It doesn't make sense to create the hotstrings in a hotkey definition. Hotkeys terminate the automatic execution of code lines and the hotstrings created within a hotkey don't remain in the script's memory because the script returns (terminates the current thread and goes back) to the place you were...
by GEV
11 Sep 2019, 06:55
Forum: Ask For Help
Topic: How to move first n files to another folder? Topic is solved
Replies: 3
Views: 201

Re: How to move first n files to another folder? Topic is solved

The only difference is that the variable n doesn't need to be evaluated everytime you press F1 if you define it in the auto-execute section.
by GEV
11 Sep 2019, 04:18
Forum: Ask For Help
Topic: How to move first n files to another folder? Topic is solved
Replies: 3
Views: 201

Re: How to move first n files to another folder? Topic is solved

Code: Select all

n := 5

F1::
Loop, Files, D:\folder1\*.*, R ; remove the R to not recurse into subfolders
{
	FileMove, %A_LoopFileFullPath%, D:\folder2\ 
	If (A_Index = n)
		break
}
return
by GEV
07 Sep 2019, 16:11
Forum: Ask For Help
Topic: BlockInput is not working.
Replies: 1
Views: 157

Re: BlockInput is not working.

Note: The OnOff and SendMouse modes might have no effect if UAC is enabled or the script has not been run as administrator. For more information, refer to the FAQ.
by GEV
07 Sep 2019, 15:52
Forum: Ask For Help
Topic: Hotstring
Replies: 15
Views: 956

Re: Hotstring

You can use a parsing Loop (or a For Loop in an array) and the Hotstring() function to create the hotstrings dynamically: words := "English,language,speakers,vocabulary,countries,spoken,modern,German,century,dialects,European,official,international,through,grammar" Loop, parse, words, `, { last_thre...
by GEV
05 Sep 2019, 16:21
Forum: Ask For Help
Topic: Disable Office Key
Replies: 2
Views: 226

Re: Disable Office Key

The #IfWin directive is useful when a particular program ignores a key (- combination) or performs some action you find undesirable.
Try this

Code: Select all

#IfWinNotActive WinTitle that cannot ever exist ahk_class WinClass
	#t::run PathToTrello
#IfWinNotActive
by GEV
04 Sep 2019, 08:55
Forum: Ask For Help
Topic: Maintaining focus on a dialog/window Topic is solved
Replies: 1
Views: 171

Re: Maintaining focus on a dialog/window Topic is solved

Depending on the case, you could use WinSet, AlwaysOnTop in combination with ControlFocus and SetTimer.
by GEV
22 Aug 2019, 13:26
Forum: Ask For Help
Topic: Disabling copy paste (including right click) Topic is solved
Replies: 4
Views: 392

Re: Disabling copy paste (including right click) Topic is solved

Code: Select all

#Persistent
OnClipboardChange("ClipChanged")
return

ClipChanged(Type) {
    If WinActive("the ahk window") || MouseIsOver("the ahk window")	
		clipboard := ""
}

MouseIsOver(WinTitle){
	MouseGetPos,,, Window
	return WinExist(WinTitle . " ahk_id " . Window)
}
by GEV
20 Aug 2019, 11:43
Forum: Ask For Help
Topic: Folder physical location keeps changing
Replies: 1
Views: 143

Re: Folder physical location keeps changing

Example: open the folder "D:\my folder" in Save As every time this window pops up #Persistent folder_location := "D:\my folder\" SetTimer, open_folder_location, 1000 Return open_folder_location: ; wait for the Save As window and activate it WinWait, Save As ahk_class #32770 WinActivate, Save As ahk_...
by GEV
19 Aug 2019, 14:26
Forum: Ask For Help
Topic: Is it possible to find the AHK_ID of window under cursor, without making it active window
Replies: 1
Views: 157

Re: Is it possible to find the AHK_ID of window under cursor, without making it active window

Code: Select all

MouseGetPos,,, WuM ; get the window below the mouse 
WinGet, ID_WuM, ID, ahk_id %WuM%
MsgBox, % ID_WuM
WinGetTitle, title, ahk_id %WuM% 
MsgBox, % title
by GEV
18 Aug 2019, 09:56
Forum: Ask For Help
Topic: Extract Text from URL Topic is solved
Replies: 5
Views: 316

Re: Extract Text from URL Topic is solved

Code: Select all

URL := "https siteurl.com /abcbac/ABCD123.php"
MsgBox % "hylighted text:`n`n """  StrSplit(URL,"/").Pop()""""
https://www.autohotkey.com/docs/objects/Object.htm
by GEV
15 Aug 2019, 11:00
Forum: Ask For Help
Topic: Help with a simples script
Replies: 2
Views: 150

Re: Help with a simples script

Code: Select all

F8::
Toggle := !Toggle
If Toggle
	SetTimer PressTheKey, 100
else
	SetTimer PressTheKey, off
return

PressTheKey:
	Send a
return
by GEV
15 Aug 2019, 10:51
Forum: Ask For Help
Topic: Can I use this to perform an action after certain time of inactivity?
Replies: 2
Views: 205

Re: Can I use this to perform an action after certain time of inactivity?

You can use SetTimer and the built-in variable A_TimeIdle to check the time that have elapsed since the system last received keyboard, mouse, or other input. #Persistent SetTimer, Check, 5000 ; check every 5 seconds return Check: if (A_TimeIdle > 5000) { MsgBox, The last keyboard or mouse activity w...
by GEV
13 Aug 2019, 16:02
Forum: Ask For Help
Topic: Problem To Find String Topic is solved
Replies: 2
Views: 400

Re: Problem To Find String Topic is solved

Code: Select all

clipboard = 
(
Name:
Jonho Smith

Phone 1:
42342342

Phone 2:
12313232

City:
NY

Description:
Installation failure

Erro - 101XX
)
ClipWait 1
Description := StrSplit(clipboard,"`nDescription:`n").2

MsgBox, % Description
by GEV
05 Aug 2019, 02:51
Forum: Ask For Help
Topic: change language
Replies: 2
Views: 200

Re: change language

Try ; https://docs.microsoft.com/de-de/windows/desktop/Intl/language-identifier-constants-and-strings F7:: SetDefaultKeyboardLang(0x02809) ; english F8:: SetDefaultKeyboardLang(0x0407) ; german F9:: SetDefaultKeyboardLang(0x040D) ; hebrew ; https://autohotkey.com/boards/viewtopic.php?f=6&t=18519 Set...
by GEV
02 Aug 2019, 10:40
Forum: Ask For Help
Topic: Multiple winclose windows
Replies: 6
Views: 616

Re: Multiple winclose windows

Best solution (in my opinion):

Code: Select all

GroupAdd, Unwanted_Windows, Warning
GroupAdd, Unwanted_Windows, information

Loop
{
	WinWait, ahk_group Unwanted_Windows
	WinClose
}
by GEV
01 Aug 2019, 12:55
Forum: Ich brauche Hilfe
Topic: Schnelles Kopieren/Markieren des gesamten Strings mit Sonderzeichen über Doppelklick
Replies: 6
Views: 708

Re: Schnelles Kopieren/Markieren des gesamten Strings mit Sonderzeichen über Doppelklick

Es gibt unterschiedliche Konflikte beim Kopieren von Inhalten aus Emails in Outlook 2016. Sei es, dass man eine String aus der Betreff Zeile kopiert, dann fehlt ein Teil oder der Text ergänzt sich mit weiteren Zeichen - aus Donnerstag wird DonnerDonnerstag - oder - wenn man die Email öffnet und aus...
by GEV
01 Aug 2019, 10:04
Forum: Ich brauche Hilfe
Topic: Schnelles Kopieren/Markieren des gesamten Strings mit Sonderzeichen über Doppelklick
Replies: 6
Views: 708

Re: Schnelles Kopieren/Markieren des gesamten Strings mit Sonderzeichen über Doppelklick

Probier dies: #If (A_Cursor = "IBeam") ; Der Mauszeiger steht über auswählbarem Text ~LButton:: If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey <= DllCall("GetDoubleClickTime")) ; Doppelklick { Text_L := "" Text_R := "" clipboard := "" Send {Esc}{Shift Down}{Home}{Shift Up} ; Zeilen-Text...

Go to advanced search