Search found 1376 matches

by Masonjar13
03 Mar 2016, 22:07
Forum: Ask for Help (v1)
Topic: PrintScreen in a hotkey GUI control?
Replies: 4
Views: 1342

Re: PrintScreen in a hotkey GUI control?

Incorrect attempt of using hotkeys for a gui, is all. Easy fix. gui +hwndghwnd ; other stuff #if winActive("ahk_id " ghwnd) ^Printscreen::msgbox Hotkey working ^F1::msgbox Also working #if If you want them to do sub-routines of attached glables, you can use GoSub for the hotkeys. Edit: I read that w...
by Masonjar13
03 Mar 2016, 02:41
Forum: Ask for Help (v1)
Topic: Exit a program on Hibernate
Replies: 2
Views: 842

Re: Exit a program on Hibernate

That's because, as it says, you can't have a hotkey inside the function. I think you just forgot to remove it? ^z::Process,Close,radiosure.exe should be Process,Close,radiosure.exe
by Masonjar13
03 Mar 2016, 02:14
Forum: Ask for Help (v1)
Topic: Keypad Problem
Replies: 4
Views: 1100

Re: Keypad Problem

#if getKeyState("Numpad1","P") Numpad3::Click 1863, 881, 2 #if Although, same issue, 1 will always be sent. There are ways around that, but I would suggest using a hotkey to toggle this hotkey on/off. Edit: wrote up an example of a toggle. There are a few different ways to do so, this is just one o...
by Masonjar13
28 Feb 2016, 21:58
Forum: Ask for Help (v1)
Topic: Closing PIA
Replies: 7
Views: 2678

Re: Closing PIA

Did you try to send message to the toolbar (tray icon) ? I tried controlclick etc but it just click on the taskbar, not the control itself : F5:: ;WinActivate ahk_class Shell_TrayWnd ; ToolbarWindow321 ; ControlSend ToolbarWindow321, RButton ,ahk_class Shell_TrayWnd ControlClick , , ahk_class Shell...
by Masonjar13
28 Feb 2016, 21:57
Forum: Ask for Help (v1)
Topic: Closing PIA
Replies: 7
Views: 2678

Re: Closing PIA

Did you try to send message to the toolbar (tray icon) ? I tried controlclick etc but it just click on the taskbar, not the control itself : F5:: ;WinActivate ahk_class Shell_TrayWnd ; ToolbarWindow321 ; ControlSend ToolbarWindow321, RButton ,ahk_class Shell_TrayWnd ControlClick , , ahk_class Shell...
by Masonjar13
26 Feb 2016, 12:31
Forum: Ask for Help (v1)
Topic: Re enabling alt tab/ win tab / windows key
Replies: 1
Views: 708

Re: Re enabling alt tab/ win tab / windows key

Close the script. If you mean something else, you should be more specific.
by Masonjar13
26 Feb 2016, 12:24
Forum: Ask for Help (v1)
Topic: file.write vs fileappend
Replies: 4
Views: 3412

Re: file.write vs fileappend

file.write() will, if not changed, overwrite everything in the file, so if you have to delete then append the same file, write() would make more sense. It also gets around the "file already opened" error (it has for me, anyway). If neither of those apply, although I haven't ran performance tests mys...
by Masonjar13
25 Feb 2016, 19:40
Forum: Ask for Help (v1)
Topic: [solved] How to make a DIY input box using Gui in a function?
Replies: 14
Views: 3029

Re: How to make a DIY input box using Gui in a function?

untrue that guis are global guis also allow the use of static variables in a function Gui's are still global. I could easily place other code to re-name, move, change controls around, etc. outside of the function, or in a completely different script. The associated variables may not be global, but ...
by Masonjar13
25 Feb 2016, 19:38
Forum: Ask for Help (v1)
Topic: [solved] How to make a DIY input box using Gui in a function?
Replies: 14
Views: 3029

Re: How to make a DIY input box using Gui in a function?

Shadowpheonix wrote: You probably also want to remove dName from the Static declarations since you are no longer using it. ;)
Obviously :roll: Lol, just edited it out.
by Masonjar13
25 Feb 2016, 03:04
Forum: Ask for Help (v1)
Topic: Change 0, 0 coordinates count point.
Replies: 7
Views: 1458

Re: Change 0, 0 coordinates count point.

Have you considered using ImageSearch?
by Masonjar13
24 Feb 2016, 21:51
Forum: Ask for Help (v1)
Topic: [solved] How to make a DIY input box using Gui in a function?
Replies: 14
Views: 3029

Re: How to make a DIY input box using Gui in a function?

Is there any reason for the dName variable? You can just pass defaultName directly... I assumed, without testing, that it needed to be static. Right on both accounts; I've modified my code. MyInput(defaultname) { static t,myName,ghwnd if(!t){ t:=1 Gui, aInput:Add, Text,, Enter your name: Gui, aInpu...
by Masonjar13
24 Feb 2016, 19:20
Forum: Ask for Help (v1)
Topic: [solved] How to make a DIY input box using Gui in a function?
Replies: 14
Views: 3029

Re: How to make a DIY input box using Gui in a function?

Yes, actually: there's already a built-in label for that. MyInput(defaultname) { static t,dName,myName dName:=defaultname if(!t){ t:=1 Gui, aInput:Add, Text,, Enter your name: Gui, aInput:Add, Edit, vMyName ym, % dName Gui, aInput:Add, Button, default, OK Gui, aInput:Add, Button, , Cancel }else GuiC...
by Masonjar13
24 Feb 2016, 19:09
Forum: Ask for Help (v1)
Topic: [solved] How to make a DIY input box using Gui in a function?
Replies: 14
Views: 3029

Re: How to make a DIY input box using Gui in a function?

Because destroying it and reinitializing it every time is inefficient. It does work, though. And I just forgot to accommodate for that default value. MsgBox % MyInput(A_UserName) MsgBox % MyInput(A_tickCount) MyInput(defaultname) { static t,dName,myName dName:=defaultname if(!t){ t:=1 Gui, aInput:Ad...
by Masonjar13
24 Feb 2016, 17:55
Forum: Ask for Help (v1)
Topic: [solved] How to make a DIY input box using Gui in a function?
Replies: 14
Views: 3029

Re: How to make a DIY input box using Gui in a function?

Gui's themselves are global; there's not a way to really isolate it. It can still be accessed globally, but here's a workaround: MsgBox % MyInput(A_UserName) MyInput(defaultname) { static t,dName,myName dName:=defaultname if(!t){ t:=1 Gui, aInput:Add, Text,, Enter your name: Gui, aInput:Add, Edit, v...
by Masonjar13
24 Feb 2016, 15:25
Forum: Gaming Help (v1)
Topic: I need a script that CANNOT be closed until I reboot or shut down my PC. Topic is solved
Replies: 10
Views: 1875

Re: I need a script that CANNOT be closed until I reboot or shut down my PC. Topic is solved

Simply, what you're asking for can't be done. There would always be a way to close it, unless someone else made it for you and you didn't know how. Regardless, this is not an appropriate question. I would suggest a behavioral change, or block the in-game chat.
by Masonjar13
24 Feb 2016, 15:20
Forum: Ask for Help (v1)
Topic: Change 0, 0 coordinates count point.
Replies: 7
Views: 1458

Re: Change 0, 0 coordinates count point.

By using an offset, yes. Subtract a_screenHeight from any y-coordinate. This is limited to in-script actions, however, and what you're asking for can't be changed at a system level.
by Masonjar13
24 Feb 2016, 10:55
Forum: Ask for Help (v1)
Topic: Closing PIA
Replies: 7
Views: 2678

Re: Closing PIA

I'm guessing you've already tried this most likely, but seeing as you didn't specify, I'm suggesting it anyway. This should close the program rather than killing the process. I have indeed tried this, prior to trying postMessage. WinClose uses the WM_Close (0x10) message. Assuming neither of you ha...
by Masonjar13
22 Feb 2016, 20:20
Forum: Ask for Help (v1)
Topic: Closing PIA
Replies: 7
Views: 2678

Re: Closing PIA

(bump)
by Masonjar13
21 Feb 2016, 17:55
Forum: Ask for Help (v1)
Topic: How to make a button switch on and off
Replies: 2
Views: 1335

Re: How to make a button switch on and off

Untested:

Code: Select all

$MButton::send % "{MButton " (t:=!t?"down":"up") "}"
by Masonjar13
21 Feb 2016, 17:04
Forum: Ask for Help (v1)
Topic: Closing PIA
Replies: 7
Views: 2678

Closing PIA

Simply, I'm trying to "properly" close PIA's software . I had one method that worked for a time. piaShutdown(loc=""){ static fLoc:=a_programFiles "\pia_manager\tmp\pia_tray_shutdown.txt" kv:=fileOpen(loc?loc:fLoc,"w") kv.write("1") kv.close() } This doesn't work now, however, it just makes the tray ...

Go to advanced search