Search found 319 matches

by wizardzedd
12 Mar 2016, 01:33
Forum: Ask For Help
Topic: Timer calling completely wrong function...
Replies: 6
Views: 1566

Re: Timer calling completely wrong function...

Thanks for clarifying Lexicos. Always nice to learn a thing or 2. :)
by wizardzedd
11 Mar 2016, 23:23
Forum: Ask For Help
Topic: Timer calling completely wrong function...
Replies: 6
Views: 1566

Re: Timer calling completely wrong function...

You can use a function object which has bound the parameter this as a timer.

Code: Select all

#Persistent
#SingleInstance, force
t:=new test()
return
class test 
{
	__New() {
		m:=this.coolTimer.bind(this)
		setTimer, %m%, 1000
	}
	
	coolTimer() {
		static i:=1
		ToolTip % ++i
	}
}
by wizardzedd
11 Mar 2016, 23:17
Forum: Ask For Help
Topic: Timer calling completely wrong function...
Replies: 6
Views: 1566

Re: Timer calling completely wrong function...

Its not a bug, its a feature! If Label is omitted, A_ThisLabel will be used. For example, SetTimer,, Off can be used inside a timer subroutine to turn off the timer. In your case the label this.DestroyGui does not exist, since classes implicitly pass this as the first parameter to functions inside ...
by wizardzedd
11 Mar 2016, 18:12
Forum: Ask For Help
Topic: Disable, then re enable a microphone after coming out of sleep
Replies: 45
Views: 7347

Re: Disable, then re enable a microphone after coming out of sleep

EDIT: Fixed a bug with right clicking listview. I couldn't get WM_RBUTTONDOWN/UP to work and appskey was unreliable. I switched to controlclick and it seems ok now. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #SingleInstance, force ; Don't worry about anno...
by wizardzedd
11 Mar 2016, 17:08
Forum: Scripts and Functions
Topic: Create a new AutoHotkey script
Replies: 4
Views: 1328

Re: Create a new AutoHotkey script

To automatically open the template: Save the following as "NewAHK.lua" in your sciTE folder if props["FileNameExt"] == "" and editor.Length == 0 and not buffer.templateLoaded then f = io.open(os.getenv("windir").."\\ShellNew\\Template.ahk", "r") if f then t = f:read("*all") if t:sub(1, 3) == "\239\1...
by wizardzedd
11 Mar 2016, 13:59
Forum: Ask For Help
Topic: [Solved] Request Tracker RESTful API + AHK
Replies: 15
Views: 3759

Re: [Help] Request Tracker RESTful API + AHK

I didn't do any testing but at a quick glance I would say that this line is wrong:

Code: Select all

oHTTP.Send("content= " & RTContent)
this concatenates "content=" with RTContent and sends it. I believe it should just be:

Code: Select all

oHTTP.Send(RTContent)
by wizardzedd
11 Mar 2016, 11:03
Forum: Ask For Help
Topic: Disable, then re enable a microphone after coming out of sleep
Replies: 45
Views: 7347

Re: Disable, then re enable a microphone after coming out of sleep

x is 353 y is 361 text at position 2 is -1 this seems to poll the mouse location, which is always a little different each time i run it. I assume it has no real bearing on the script besides being semi close? This is letting windows decide where to open my sound window, and then right clicking micr...
by wizardzedd
11 Mar 2016, 00:05
Forum: Ask For Help
Topic: Disable, then re enable a microphone after coming out of sleep
Replies: 45
Views: 7347

Re: Disable, then re enable a microphone after coming out of sleep

Sometimes I wish all systems could be the same lol. The 2 calls in question will be clickMenuItem(pos) and getText(pos) . Try running this code with the menu already open, press ctrl-b. What do the 2 message boxes say? . EDIT: It should say "x is (beginning x position of 2nd menu item) y is (beginni...
by wizardzedd
10 Mar 2016, 22:36
Forum: Ask For Help
Topic: Disable, then re enable a microphone after coming out of sleep
Replies: 45
Views: 7347

Re: Disable, then re enable a microphone after coming out of sleep

oops, thats what happens when you cut out parts of code xD. ; ; AutoHotkey Version: 1.1.23.01 ; Language: English ; Platform: Windows 10 ; Author: WizardZedd ; ; Script Function: ; ; #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #SingleInstance, force ; Don'...
by wizardzedd
10 Mar 2016, 22:34
Forum: Scripts and Functions
Topic: Create a new AutoHotkey script
Replies: 4
Views: 1328

Re: Create a new AutoHotkey script

Have you considered using the shellnew\template.ahk ? Unless of course you only want the above for certain cases. In my case I configured SciTE4AutoHotkey to automatically use the template, but now I'm wondering if I can get it to automatically save... especially for those scripts that I only want f...
by wizardzedd
10 Mar 2016, 22:08
Forum: Ask For Help
Topic: Disable, then re enable a microphone after coming out of sleep
Replies: 45
Views: 7347

Re: Disable, then re enable a microphone after coming out of sleep

I see now, so using the code I wrote before you would basically have to set the property 2 times (couldn't just hit apply since it removes the device when disabled.) I decided to try a different approach that uses the context menu that hopefully will be simpler and work better. #SingleInstance, forc...
by wizardzedd
10 Mar 2016, 20:26
Forum: Ask For Help
Topic: Get names / VKs + SCs of all keys
Replies: 9
Views: 3933

Re: Get names / VKs + SCs of all keys

I don't know about getting all the keys without a button press, but if you do have a button press you can do something like this: #InstallKeybdHook ^k:: KeyHistory WinWaitActive, % title:="AutoHotkey v" A_AhkVersion controlGetText, var, Edit1, % title obj:=[] , pos:=1 while(pos:=RegExMatch(var, "`am...
by wizardzedd
10 Mar 2016, 19:33
Forum: Ask For Help
Topic: Disable, then re enable a microphone after coming out of sleep
Replies: 45
Views: 7347

Re: Disable, then re enable a microphone after coming out of sleep

In your code the currentSetting has not changed. What has changed is the properties.choice . Currently it works perfectly (for me, I could probably remove the abort code as well). Also, half the time it did not actually finish, it would open the properties of the microphone but then do nothing It sh...
by wizardzedd
10 Mar 2016, 11:59
Forum: Ask For Help
Topic: Disable, then re enable a microphone after coming out of sleep
Replies: 45
Views: 7347

Re: Disable, then re enable a microphone after coming out of sleep

ok I added more code, and changed to listview double click to open the properties window. Try this out (oh and make sure you show disabled devices): #SingleInstance, force device:="Microphone" ; change to your device sounds:=new C_Sounds() ; Sounds window sounds.activateRecording() ; Activate Record...
by wizardzedd
10 Mar 2016, 02:14
Forum: Ask For Help
Topic: Disable, then re enable a microphone after coming out of sleep
Replies: 45
Views: 7347

Re: Disable, then re enable a microphone after coming out of sleep

I went big mode lol, although I was surprised that I didn't find a simpler way to click a listview item. Anyway here you are: device:="Microphone" ; change to your device sounds:=new C_Sounds() ; Sounds window sounds.activateRecording() ; Activate Recording Tab properties:=sounds.openProperties(devi...
by wizardzedd
09 Mar 2016, 21:19
Forum: Ask For Help
Topic: SendInput Is Not Releasing KeyState
Replies: 7
Views: 1162

Re: SendInput Is Not Releasing KeyState

why doesn't PrintScreen::RWin work?

Code: Select all

PrintScreen::RWin
^#f:: MsgBox Hello!
by wizardzedd
09 Mar 2016, 21:14
Forum: Ask For Help
Topic: Disable, then re enable a microphone after coming out of sleep
Replies: 45
Views: 7347

Re: Disable, then re enable a microphone after coming out of sleep

For starters: SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. SetTitleMatchMode, 2 ; partial titles if not A_IsAdmin { Run, *RunAs "%A_ScriptFullPath%" ExitApp } Run, devmgmt.msc WinWait, D...
by wizardzedd
09 Mar 2016, 20:16
Forum: Ask For Help
Topic: Help for stroke victim Topic is solved
Replies: 1
Views: 719

Re: Help for stroke victim Topic is solved

This still needs some work but should get you started: #InstallKeybdHook #UseHook SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. myKeyboard:=new C_KeyBoard() for i in myKeyboard.keys hotke...
by wizardzedd
09 Mar 2016, 18:26
Forum: Ask For Help
Topic: Numerical list items
Replies: 9
Views: 1666

Re: Numerical list items

oh I should have seen that coming. Its because sometimes it takes a moment for the program to receive the message sent. Try putting a sleep in between. :o:hotkey:: Send, Hello{Space} Input, i, V, `,{Esc} if (ErrorLevel != "EndKey:,") return Send, `n`n^b^uBoldUnderlined^b^u`n clipboard= ( 1) Number L...
by wizardzedd
09 Mar 2016, 14:55
Forum: Ask For Help
Topic: multimedia keyboard
Replies: 1
Views: 451

Re: multimedia keyboard

https://autohotkey.com/docs/KeyList.htm Under multimedia section it says: Note: The function assigned to each of the keys listed above can be overridden by modifying the Windows registry. This table shows the default function of each key on most versions of Windows. HKLM\SOFTWARE\Microsoft\Windows\...

Go to advanced search