Search found 175 matches

by Cuadrix
04 Apr 2018, 12:15
Forum: Ask For Help
Topic: Get values of Array without For-Loop, and set to variable? Topic is solved
Replies: 4
Views: 293

Get values of Array without For-Loop, and set to variable? Topic is solved

Data = ( One Two Three ) Arr := StrSplit(Data, "`n") The code above Splits each line in the variable Data and assigns them as values to keys in array Arr . When creating an array this way, it is almost instantaneous. Is it possible to reverse this process and assign all values in the array Arr to a...
by Cuadrix
04 Apr 2018, 10:15
Forum: Ask For Help
Topic: Array.RemoveAt store multiple removed values? Topic is solved
Replies: 3
Views: 284

Array.RemoveAt store multiple removed values? Topic is solved

Array := ["One", "Two", "Three"] Dump := Array.RemoveAt(1) MsgBox, % Dump ; Shows value of key 1 Using Array.RemoveAt(1) in the code above returns the value of the first key in Array to variable Dump , however when setting the Length parameter: Array := ["One", "Two", "Three"] Dump := Array.RemoveA...
by Cuadrix
03 Apr 2018, 02:54
Forum: Ask For Help
Topic: getCurrentTime() for YouTube Video
Replies: 2
Views: 205

Re: getCurrentTime() for YouTube Video

Is the Youtube video playing in Chrome, IE..?
What you are asking for should be possible using IE and Active X.
by Cuadrix
02 Apr 2018, 23:24
Forum: Ask For Help
Topic: A_AhkPath in compiled script Topic is solved
Replies: 1
Views: 153

A_AhkPath in compiled script Topic is solved

Does A_AhkPath retrieve the name of the EXE file that is running the current script, or does it retrieve the path where AutoHotkey.exe is located? In docs, it says: For non-compiled scripts: The full path and name of the EXE file that is actually running the current script. For example: C:\Program F...
by Cuadrix
02 Apr 2018, 21:14
Forum: Scripts and Functions
Topic: LineDelete() - Delete Line Of Text From A Variable / No Loop
Replies: 9
Views: 1493

Re: LineDelete()

I edited the code a little;
• Now it looks a titty bitty neater.
• The function will return InVar unaltered if a non-existent option is used.
by Cuadrix
01 Apr 2018, 20:43
Forum: Scripts and Functions
Topic: LineDelete() - Delete Line Of Text From A Variable / No Loop
Replies: 9
Views: 1493

LineDelete() - Delete Line Of Text From A Variable / No Loop

LineDelete() Deletes a specific line or a range of lines from a variable containing one or more lines of text. OutputVar := LineDelete(InVar, Pos [, Range, Options := "B", DumpVar]) ;Parameters inside [] are optional. Parameters ¯¯¯¯¯¯¯¯¯¯¯¯¯ InVar | The variable whose lines will be deleted. Pos | ...
by Cuadrix
01 Apr 2018, 04:28
Forum: Ask For Help
Topic: Remove multiple items from array? Topic is solved
Replies: 2
Views: 152

Re: Remove multiple items from array? Topic is solved

That is precisely what I am after. Array := ["One", "Two", "Three", "Four", "Five"] Dump := Array.RemoveAt(2 TO 4) ;Remove items from 2 to 4? How can I set up a range for removing items from a simple array as above? EDIT: Oh, damn it. I was looking at Objects , rather than the page you linked, and t...
by Cuadrix
01 Apr 2018, 04:04
Forum: Ask For Help
Topic: Remove multiple items from array? Topic is solved
Replies: 2
Views: 152

Remove multiple items from array? Topic is solved

I know it could be done by looping, but is there any faster way for removing multiple items from an array without needing to loop?
by Cuadrix
31 Mar 2018, 14:48
Forum: Ask For Help
Topic: GUI questions Topic is solved
Replies: 3
Views: 297

Re: GUI questions Topic is solved

- How can I have text that wraps round onto the next line? (And everything else pushes down and expands accordingly). Never tried it before. You might have to use If and else statements to get it work. No idea. - What's the best way of positioning a second GUI in the exact centre of the screen? I h...
by Cuadrix
30 Mar 2018, 04:16
Forum: Ask For Help
Topic: Delete specific empty line in variable? Topic is solved
Replies: 2
Views: 164

Delete specific empty line in variable? Topic is solved

Let's say I have a variable which contains multiple empty lines like this:

Code: Select all

Var =
(
One
Two

Three

Four
Five

Six
)
How can I completely erase/delete let's say blank line nr.2, so it looks like this:

Code: Select all

Var =
(
One
Two

Three
Four
Five

Six
)
by Cuadrix
29 Mar 2018, 02:11
Forum: Ask For Help
Topic: What does $ signify?
Replies: 4
Views: 293

Re: What does $ signify?

Ironic that when I click on that link it takes me to a page with an infinite reload loop
It happened to me too, don't know why. Clearing the cache solved the problem.
by Cuadrix
28 Mar 2018, 20:50
Forum: Ask For Help
Topic: What does $ signify?
Replies: 4
Views: 293

Re: What does $ signify?

Let's say you create a hotkey like this: F1::Send {F1} Now imagine pressing the button F1 , what would happen? As you see, from the code above, when pressing F1 the script sends F1 . When the script sends F1 , it would also press the hotkey F1 , which again would send F1 , and so on, causing an infi...
by Cuadrix
28 Mar 2018, 14:03
Forum: Gaming
Topic: Restart whole script? Topic is solved
Replies: 1
Views: 148

Re: Restart whole script? Topic is solved

Just add

Code: Select all

F1::Reload
somewhere in your script.
by Cuadrix
28 Mar 2018, 13:54
Forum: Ask For Help
Topic: Changing a key to a modifier only works one time! Any ideas?
Replies: 1
Views: 116

Re: Changing a key to a modifier only works one time! Any ideas?

Use the GetKeyState function.

Code: Select all

a::
  While GetKeyState("a","P")
  {
    Send {Alt}
    Sleep, 100 ; send "Alt" every 100 miliseconds
  }
Return
by Cuadrix
28 Mar 2018, 12:46
Forum: Gaming
Topic: Detect a double key press in AutoHotkey
Replies: 7
Views: 696

Re: Detect a double key press in AutoHotkey

For an additional button with 1 second delay, just add Else If ((A_TickCount - lastShift) <= 1000) , and then under put Send l . Like this: lastShift := 0 $H:: If ((A_TickCount - lastShift) <= 250) Send e Else If ((A_TickCount - lastShift) <= 1000) ;If you want longer delay, change "1000" to somethi...
by Cuadrix
28 Mar 2018, 10:06
Forum: Ask For Help
Topic: Change a Variable with Mouse4 Button
Replies: 1
Views: 92

Re: Change a Variable with Mouse4 Button

...? :

Code: Select all

Var = 0 ;Initial value
XButton1::Var = 1 ;Change it to 1

Go to advanced search