Search found 18 matches

by BitcoinVirus
17 Dec 2019, 20:56
Forum: Ask for Help (v1)
Topic: How can I make a function call a variable declared externally?
Replies: 2
Views: 357

How can I make a function call a variable declared externally?

How can I make a function call a variable that was declared outside of the function? I tried "global" for the variable, but the name of the variable is dynamic. StrReplace(Parsed, "|", "|", Count) For k, KLine in ["O", "H", "L", "C"] { Place := A_Index Loop, % Count / 4 { Displace := A_Index - 1 Pos...
by BitcoinVirus
17 Dec 2019, 09:06
Forum: Ask for Help (v1)
Topic: More elegant way to do this? Topic is solved
Replies: 6
Views: 507

More elegant way to do this? Topic is solved

Is there a more elegant way to do this? letter := "L" If(letter = "O") Displace := 1 If(letter = "H") Displace := 2 If(letter = "L") Displace := 3 If(letter = "C") Displace := 4 MsgBox, % Displace The MsgBox should return the number 3 Place := 0 For k, v in ["O","H","L","C] { Place++ Loop, 500 { Dis...
by BitcoinVirus
13 Dec 2019, 13:44
Forum: Ask for Help (v1)
Topic: Read specific line in verible Topic is solved
Replies: 6
Views: 961

Read specific line in verible Topic is solved

How can I retrieve the text in a specific line in a multi-line variable? So far I have this: ReadVarLine(haystack,line) { Place := InStr(Haystack, "`n", true, 1, line - 1) End := InStr(Haystack, "`n", true, 1, line) return SubStr(Haystack, Place, End - Place) } Data := ( this is the 1st line this is...
by BitcoinVirus
11 Nov 2019, 09:26
Forum: Ask for Help (v1)
Topic: Dynamic variable call for Topic is solved
Replies: 1
Views: 254

Dynamic variable call for Topic is solved

I have worked on this for over an hour, with little luck I decided to ask you guys for some help. variable(GetVar) { var1 = 286 var2 = 648 var3 = 945 var4 = 456 var5 = 672 } num := 2 MsgBox, % variable(var%num%) There should be a MsgBox showing the value of "var2" (sorry for my poor english, I'm sti...
by BitcoinVirus
15 Sep 2019, 16:46
Forum: Ask for Help (v1)
Topic: Mute returns from functions - should we avoid them?
Replies: 6
Views: 1105

Re: Mute returns from functions - should we avoid them?

I don't see the reason to use return if you don't use the function to call a variable as the response, thus I see no reason to use a return without it returning anything.

Sorry for my poor English!
by BitcoinVirus
15 Sep 2019, 15:27
Forum: Ask for Help (v1)
Topic: Create variables from JSON file Topic is solved
Replies: 1
Views: 1691

Create variables from JSON file Topic is solved

I desperately need to speed this up. I have hit a roadblock with this: The propose of this is to declare 500 variables C1, C2, C3, C4 ... and so on each calling in a function that will send back a certain number in a parsed api in a different position of the .json file. The reason I chose this metho...
by BitcoinVirus
15 Sep 2019, 14:11
Forum: Ask for Help (v1)
Topic: Send to element in web-page
Replies: 3
Views: 723

Re: Send to element in web-page

#NoEnv #Include chrome.ahk SetBatchLines, -1 SetTitleMatchMode 2 url := "https www.instagram.com /" Broken Link for safety FileCreateDir, ChromeProfile Browser := new Chrome("ChromeProfile") WinWait, Chrome Page := Browser.GetPage() Page.Call("Page.navigate", {url : url}) Page.waitForLoad() while !...
by BitcoinVirus
14 Sep 2019, 20:39
Forum: Ask for Help (v1)
Topic: Send to element in web-page
Replies: 3
Views: 723

Send to element in web-page

Can this be changed to Google chrome? I can't seem to figure out how to make this work for logging into Instagram. WB := ComObjCreate("InternetExplorer.Application") WB.Visible := True WB.Navigate("https://www.instagram.com/") While wb.readyState != 4 || wb.document.readyState != "complete" || wb.bu...
by BitcoinVirus
05 Sep 2019, 20:12
Forum: Ask for Help (v1)
Topic: Adding up number in an array Topic is solved
Replies: 1
Views: 798

Adding up number in an array Topic is solved

How can I add up the numbers in a stored array?

Code: Select all

Array := [1, 2, 3, 4]
MsgBox, % Max(Array*) ; Returns 4
To:

Code: Select all

Array := [1, 2, 3, 4]
MsgBox, % Sum(Array*) ; Returns 4
by BitcoinVirus
05 Sep 2019, 15:40
Forum: Ask for Help (v1)
Topic: Simplify large lists: function to variable Topic is solved
Replies: 1
Views: 289

Simplify large lists: function to variable Topic is solved

I have no idea how this could be simplified... And I really hoping there is a way. Close0 := ApiFunction("0","Close") Close1 := ApiFunction("1","Close") Close2 := ApiFunction("2","Close") Close3 := ApiFunction("3","Close") Close4 := ApiFunction("4","Close") Close5 := ApiFunction("5","Close") Close6 ...
by BitcoinVirus
03 Sep 2019, 20:00
Forum: Ask for Help (v1)
Topic: Dynamic Variable names in Dynamic Array Topic is solved
Replies: 1
Views: 818

Dynamic Variable names in Dynamic Array Topic is solved

I have an array with multiple variables that have the same name but have a little number at the end of the variable name like a list, but how can the name of a variable be dynamic and have a dynamic array of those dynamic variable names: Num0 := "345" Num1 := "7345" Num2 := "1" Num3 := "93" Num4 := ...
by BitcoinVirus
25 Aug 2019, 12:34
Forum: Ask for Help (v1)
Topic: Parse json into arrays Topic is solved
Replies: 1
Views: 566

Parse json into arrays Topic is solved

I haven't found any way to parse json using ahk with multiple selections with the same title. I want to put all the "low" numbers in an array and the "high" numbers in an array. How do I do this with https://github.com/cocobelgica/AutoHotkey-JSON/blob/master/README.md Please excuse my poor English T...
by BitcoinVirus
11 Aug 2019, 08:12
Forum: Ask for Help (v1)
Topic: Highest number in array Topic is solved
Replies: 1
Views: 958

Highest number in array Topic is solved

I can't seem to find a function to find the largest number in an array. If there is no built-in function; how could I make one? I'm sorry if this is such a dumb question, but I really can't find a solution online. Example: A := "8" B := "4" C := "9" D := "6" E := "11" F := "12" Array := [A,B,C,D,E,F...
by BitcoinVirus
18 Jun 2019, 17:30
Forum: Ask for Help (v1)
Topic: Variable in a variable Topic is solved
Replies: 2
Views: 548

Variable in a variable Topic is solved

How could I make a variable edit a variable in this format: Currency := BTC URLDownloadToFile, https api.binance.com /api/v3/ticker/price, Broken Link for safety Cryptocurrency API.txt FileRead, json, Cryptocurrency API.txt StringTrimLeft, json, json, 1 StringTrimRight, json, json, 1 StringReplace, ...
by BitcoinVirus
07 Jun 2019, 14:27
Forum: Ask for Help (v1)
Topic: .ahk into a .exe without GUI
Replies: 3
Views: 802

Re: .ahk into a .exe without GUI

That syntax I'm finding quite confusing, could you by any chance give an example of 3. Command Line on how to automate it through a script?
by BitcoinVirus
27 Feb 2019, 21:33
Forum: Ask for Help (v1)
Topic: Add pixel to image file Topic is solved
Replies: 3
Views: 746

Re: Add pixel to image file Topic is solved

The image dimensions are well over 100, but I don't understand this return message;
https: //imgur.com/ VRJmQXG
I had to break the link for it to submit. If anyone would like to click it you will need to remove the spaces.
by BitcoinVirus
27 Feb 2019, 16:17
Forum: Ask for Help (v1)
Topic: Add pixel to image file Topic is solved
Replies: 3
Views: 746

Add pixel to image file Topic is solved

I can seem to figure out how to have a script add a pixel in a image file, such as a .png/.jpg . How can I add a single pixel to a specific coordinate with a specific color? So far I have this using GDIP, but I cant seem to understand why it wont work: #SingleInstance, Force SetBatchLines, -1 SetWor...
by BitcoinVirus
31 Jan 2019, 11:30
Forum: Ask for Help (v1)
Topic: Functions Topic is solved
Replies: 1
Views: 486

Functions Topic is solved

AutoHotKey functions are still unclear to me :| Example of what I'm trying to accomplish: SomeFunction(9,4,7,5) SomeFunction(ver1,ver2,ver3,ver4) MsgBox, % ver1 ver2 ver3 ver4 Then it sould show a MsgBox saying 9 4 7 5 I'm basicly trying to compress multiple veriables in only a few long lines in the...

Go to advanced search