Search found 1087 matches

by TheDewd
Today, 07:58
Forum: Ask For Help
Topic: From Notepad to Word .doc and back
Replies: 3
Views: 32

Re: From Notepad to Word .doc and back

Can you explain what you are trying to achieve using Word? What purpose is the macro fulfilling? There might be a way to do everything in AutoHotkey without the use of Word. Sorry I didn't answer your original request. I just thought I would see if you can provide more information in the case we can...
by TheDewd
Today, 07:53
Forum: Ask For Help
Topic: clipboard including cursor position
Replies: 1
Views: 38

Re: clipboard including cursor position

Code: Select all

#SingleInstance, Force

Clipboard := "hello there how are you doing?{Left 1}"

RegExMatch(Clipboard, "(.*)({.*})", Contents)

Clipboard := Contents1

SendInput, ^v

SendInput, % Contents2
by TheDewd
Today, 07:46
Forum: Ask For Help
Topic: Windows Spy - What is the difference between Screen/Window/Client
Replies: 1
Views: 23

Re: Windows Spy - What is the difference between Screen/Window/Client

Screen: Your entire screen and everything displayed on it. Window: A specific window, including the titlebar, menubar, statusbar, etc. Client: A specific window, EXCLUDING the titlebar, menubar, statusbar, etc. In Chrome, if you use Client, the coordinates should only match the webpage content. If y...
by TheDewd
Yesterday, 15:52
Forum: Ask For Help
Topic: Variable with Operator inside
Replies: 4
Views: 77

Re: Variable with Operator inside

My attempt at combining the functions from Laszlo's approach into a single function: #SingleInstance, Force MsgBox, % Eval("5+5") Eval(x) { i := InStr(x, "+",, 0) - 1 j := InStr(x, "-",, 0) - 1 If (i > j) { return Eval(SubStr(x, 1, i)) + Eval(SubStr(x, 0, i + 1)) } If (j > i) { return Eval(SubStr(x,...
by TheDewd
Yesterday, 15:03
Forum: Ask For Help
Topic: “Send” only working on key release Topic is solved
Replies: 5
Views: 47

Re: “Send” only working on key release Topic is solved

Try this:

Code: Select all

#SingleInstance, Force

~Shift::
	Send, {Ctrl}
	KeyWait, Shift
return
by TheDewd
Yesterday, 14:59
Forum: Ask For Help
Topic: Manipulate an Explorer window found by COM Shell.Application Topic is solved
Replies: 5
Views: 59

Re: Manipulate an Explorer window found by COM Shell.Application Topic is solved

jesswg already replied, but I was working on this example for you: Example: If Recycle Bin window is open, then Maximize it. #SingleInstance, Force q:: For Window In ComObjCreate("Shell.Application").Windows { WindowHwnd := Window.Hwnd WindowPath := Window.Document.Folder.Self.Path If (WindowPath = ...
by TheDewd
Yesterday, 14:44
Forum: Ask For Help
Topic: Script is adding decimal and zeroes from nowhere
Replies: 1
Views: 29

Re: Script is adding decimal and zeroes from nowhere

Replace .value with .text everywhere it's used.
by TheDewd
Yesterday, 14:27
Forum: Ask For Help
Topic: Variable with Operator inside
Replies: 4
Views: 77

Re: Variable with Operator inside

You can use the VBScript function Eval() , however it's only compatible with 32-bit AutoHotkey. You will be unable to use it with 64-bit AutoHotkey builds. #SingleInstance, Force var1 := "+1" var2 := 5 var3 := var2 var1 ScriptControl := ComObjCreate("ScriptControl") ScriptControl.Language := "VBScri...
by TheDewd
Yesterday, 13:01
Forum: Ask For Help
Topic: “Send” only working on key release Topic is solved
Replies: 5
Views: 47

Re: “Send” only working on key release Topic is solved

Code: Select all

~Shift::
	Send, {Ctrl}
return
Adding a ~ tilde before the hotkey will allow the hotkey's native action to be performed in addition to executing your code.
by TheDewd
Yesterday, 12:20
Forum: Ask For Help
Topic: "This Variable has not been assigned a value" help? Topic is solved
Replies: 1
Views: 46

Re: "This Variable has not been assigned a value" help? Topic is solved

It's because you're using #Warn . You should Initialize a variable before attempting to store a value to it, like this: toggle := 0 . That creates the variable, and then stores a value of 0 to it. Now the variable exists and is ready to use. This line toggle := !toggle says: If toggle is equal to 1,...
by TheDewd
Yesterday, 10:05
Forum: Forum Issues
Topic: Interface Overwrite
Replies: 5
Views: 124

Re: Interface Overwrite

I had inadvertently blocked myself from accessing the forums after changing the theme. I was confused this morning when I logged in and noticed I had a different theme enabled. I changed to Simplicity and noticed there were a log of bugs, so I then tried the SubSilver theme to see if it worked bette...
by TheDewd
11 Oct 2018, 13:39
Forum: Ask For Help
Topic: I need a script that changes the copied text and assigns it to the front for example: hi - ih
Replies: 1
Views: 23

Re: I need a script that changes the copied text and assigns it to the front for example: hi - ih

Hightlight/select a text word, and then press the middle mouse button. The text will be replaced with a reversed version. ~MButton:: ; Hotkey NewText := "" ; Initilize variable Clipboard := "" ; Clear clipboard Send, ^x ; <Cut> selected text SelText := Clipboard ; Save clipboard text to variable Loo...
by TheDewd
11 Oct 2018, 13:29
Forum: Ask For Help
Topic: Dashboard from IE windows
Replies: 1
Views: 22

Re: Dashboard from IE windows

Just execute the code in a different order: #SingleInstance, Force Run, C:\Program Files\Internet Explorer\iexplore.exe -k http://www.google.com,,, npPID1 Run, C:\Program Files\Internet Explorer\iexplore.exe -k https://www.bing.com,,, npPID2 WinWait, ahk_pid %npPID1% ahk_class IEFrame WinMove, ahk_p...
by TheDewd
11 Oct 2018, 13:11
Forum: Ask For Help
Topic: Possible to hide the command prompt comptely?
Replies: 4
Views: 41

Re: Possible to hide the command prompt comptely?

@loek3000,

Yes, that is correct. I was just about to suggest using Run with Hide
by TheDewd
10 Oct 2018, 15:41
Forum: Scripts and Functions
Topic: Greek Letters for Math Engineering
Replies: 1
Views: 86

Re: Greek Letters for Math Engineering

The selected attachment does not exist anymore.
by TheDewd
10 Oct 2018, 15:37
Forum: Ask For Help
Topic: Copy Folders without copying subfolders
Replies: 2
Views: 36

Re: Copy Folders without copying subfolders

Copy only files from root of source folder, ignoring sub-folders and files within sub-folders... #SingleInstance, Force CopyFolderFiles("C:\SourceFolder", "C:\DestinationFolder") CopyFolderFiles(SourceDir, DestDir) { Loop, Files, % SourceDir "\*.*", F { FileCopy, % A_LoopFileLongPath, % DestDir } }
by TheDewd
10 Oct 2018, 15:23
Forum: Wish List
Topic: button including an image
Replies: 3
Views: 62

Re: button including an image

There are existing user-created functions available to do this. See https://autohotkey.com/boards/viewtopic.php?p=11390#p11390 I agree that it would be great to have this feature available, however Lexikos doesn't care to be bothered with requests that can be easily solved using additional functions...
by TheDewd
10 Oct 2018, 14:08
Forum: Ask For Help
Topic: I'm making an error but can't find it for the life of me
Replies: 4
Views: 56

Re: I'm making an error but can't find it for the life of me

Try using Fast RGB. Working now for me...

Code: Select all

*E::
	PixelSearch, RedX, RedY, 0, 0, 1200, 600, 0xF14E54, 20, Fast RGB
	MouseMove, RedX, RedY
return
I think the issue is you've specified such a large area to search and it's taking too long.
by TheDewd
10 Oct 2018, 14:01
Forum: Ask For Help
Topic: Help with code
Replies: 2
Views: 42

Re: Help with code

Code: Select all

#SingleInstance, Force

Toggle := 0

F2::
	Toggle := !Toggle
	SetTimer, Timer1, % (Toggle ? 200 : "Off")
Return

Timer1:
	Send, r
return

~$3::
~$4::
	RegExMatch(A_ThisHotkey, "\d", Key)

    While(GetKeyState(Key, "P")) {
		Send, % (Key = 3 ? "{LButton}" : "{RButton}")
		Sleep, 10
    }
return
by TheDewd
10 Oct 2018, 13:48
Forum: Ask For Help
Topic: I'm making an error but can't find it for the life of me
Replies: 4
Views: 56

Re: I'm making an error but can't find it for the life of me

PixelSearch, RedX, RedY, 0, 0, 1200, 600, 0xF14E54, 20, RGB

Go to advanced search