Search found 3459 matches

by evilC
Yesterday, 16:16
Forum: Scripts and Functions
Topic: AppFactory - Easily allow end-users to configure hotkeys and settings in your scripts
Replies: 0
Views: 79

AppFactory - Easily allow end-users to configure hotkeys and settings in your scripts

Placeholder for now, I have written an AHK_L version of AppFactory The thread for the AHK_H version is here , see there for full information. TL/DR is this code #SingleInstance force #NoEnv #Include AppFactory.ahk factory := new AppFactory() factory.AddInputButton("HK1", "w200", ...
by evilC
Yesterday, 13:08
Forum: Ask For Help
Topic: hotkeys on time loop
Replies: 3
Views: 35

Re: hotkeys on time loop

Why not just write 3600000?

To make it clear what I am doing

A_TickCount increments by 1 every ms.
So I add 1 hour's worth of ticks to the current value - when A_TickCount reaches that value, 1 hour has passed.

oops, just realized.
Code is wrong.

Should be while (A_TickCount < t)
by evilC
Yesterday, 09:40
Forum: Ask For Help
Topic: ternary operator Topic is solved
Replies: 11
Views: 76

Re: ternary operator Topic is solved

You could also do like this:

Code: [Select all]GeSHi © Codebox Plus

if (choice = "left" || choice = "right") f__move(choice)
if (choice = "up" || choice = "down") f__different_function()
by evilC
Yesterday, 09:38
Forum: Ask For Help
Topic: ternary operator Topic is solved
Replies: 11
Views: 76

Re: ternary operator Topic is solved

Ah, correction, you may need to use:

if (choice = "left") f__move("left") (Add brackets and quotes around left)
by evilC
Yesterday, 09:36
Forum: Ask For Help
Topic: ternary operator Topic is solved
Replies: 11
Views: 76

Re: ternary operator Topic is solved

my point is TO SHORTEN THE CODE would like to have something like if choice = left f__move("left") if choice = right f__different_function() (else command is not necessary here) Is it possible for choice to hold both left AND right? No. So whilst you do not NEED an else, it is more CPU ef...
by evilC
Yesterday, 09:26
Forum: Ask For Help
Topic: ternary operator Topic is solved
Replies: 11
Views: 76

Re: ternary operator Topic is solved

I just did. f__move(choice) is basically equivalent to: if choice = left f__move("left") else if choice = right f__move("right") else if choice = up f__move("up") else if choice = down f__move("down") Also, if you say "I don't need it on one line&...
by evilC
Yesterday, 09:24
Forum: Ask For Help
Topic: Help creating Array from inputbox
Replies: 1
Views: 33

Re: Help creating Array from inputbox

See StrSplit
If you want a true array, not a pseudo-array, you want the function version StrSplit()
by evilC
Yesterday, 09:22
Forum: Ask For Help
Topic: hotkeys on time loop
Replies: 3
Views: 35

Re: hotkeys on time loop

Code: [Select all]GeSHi © Codebox Plus

e::
t := A_TickCount + ((1000 * 60) * 60) ; Work out time one hour from now
while (t < A_TickCount){
Click 1701, 623
Sleep 1000
}
return
by evilC
Yesterday, 09:19
Forum: Ask For Help
Topic: ternary operator Topic is solved
Replies: 11
Views: 76

Re: ternary operator Topic is solved

Besides, you can do the whole lot on one line anyway:

f__move(choice)
by evilC
Yesterday, 09:18
Forum: Ask For Help
Topic: ternary operator Topic is solved
Replies: 11
Views: 76

Re: ternary operator Topic is solved

A ternary operator is logically equivalent to an if/else block, and you do not have one of those.
I am suspecting though that you want one, as choice can only be one thing.

It would be very complicated though, you would need 3 nested ternarys
by evilC
Yesterday, 06:10
Forum: Gaming
Topic: Spam F6 key
Replies: 2
Views: 13

Re: Spam F6 key

You are pressing the keys too fast.
No game can recognize 1000 keypresses a second, unless maybe if it is running at 1000 FPS

Add SetKeyDelay, 0, 50 to the start of your script. Remove the Sleep 0
You may actually need SetKeyDelay, 50, 50
by evilC
Yesterday, 06:08
Forum: Gaming
Topic: mouse buttons release
Replies: 1
Views: 18

Re: mouse buttons release

Code: [Select all]GeSHi © Codebox Plus

Xbutton1::
if (GetKeyState("LButton", "P") && GetKeyState("RButton", "P")){
Send {LButton Up}
}
return
by evilC
Yesterday, 05:12
Forum: Gaming
Topic: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Replies: 609
Views: 93873

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

@ghamantorr Currently there is nothing in UCR to do that, but it could be done with a custom plugin. It seems to me that this is probably most easily solved by extending the Code Runner plugin to allow running some code on button release Save to Plugins\Core and overwrite: /* Demos persistent guicon...
by evilC
19 Oct 2017, 16:02
Forum: Gaming
Topic: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Replies: 609
Views: 93873

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

OK, thanks for the heads up, sorry to cause confusion!
by evilC
19 Oct 2017, 15:57
Forum: Gaming
Topic: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Replies: 609
Views: 93873

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

Ah, have I left 1.16 on evilc.com ?
by evilC
19 Oct 2017, 12:58
Forum: Ask For Help
Topic: Can a bluetooth controller be detected and remaped?
Replies: 3
Views: 36

Re: Can a bluetooth controller be detected and remaped?

Well as long as it can send a key press of some kind, then yes you should be able to remap it, although as I said, depending on how it is done you may not be able to use the corresponding button on your physical keyboard (Which is probably no loss)
by evilC
19 Oct 2017, 11:44
Forum: Ask For Help
Topic: Can a bluetooth controller be detected and remaped?
Replies: 3
Views: 36

Re: Can a bluetooth controller be detected and remaped?

I know it IS technically feasible, there are standards for bluetooth keyboards, so as long as that is all that it actually is (A keyboard with one "key"), then in theory, yes. I also know that, for example, Android devices can use regular PC keyboards (incl bluetooth ones) However, be awar...
by evilC
19 Oct 2017, 11:29
Forum: Gaming
Topic: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Replies: 609
Views: 93873

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

Ack, I thought I fixed that :( Mouse Wheel is unique insofar as it has a press, but not a release event. The "Bind" routine waits for a release event, hence the problem. I did put code in to work around this, but I guess it is not working. Are you sure you are using the latest release of U...
by evilC
19 Oct 2017, 05:20
Forum: Gaming
Topic: Help Arma 3
Replies: 1
Views: 29

Re: Help Arma 3

Try adding SetKeyDelay, 0, 50 to the start of the script
Try running the script as admin
by evilC
19 Oct 2017, 04:07
Forum: Gaming
Topic: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017
Replies: 609
Views: 93873

Re: Universal Control Remapper (UCR) - v0.1.17 21st Aug 2017

When you run the code, a tooltip should appear on the screen saying "Axis Value: <Number>" <Number> should change when you move the pedal. But I am unsure that "JoyZ" would be right. What is the label for the pedal axis in joy.cpl? https://i.imgur.com/NoaDWK8.png If it is "S...

Go to advanced search