Search found 225 matches

by SpeedMaster
13 minutes ago
Forum: Tutorials
Topic: Learn Autohotkey
Replies: 5
Views: 3699

Re: Learn Autohotkey

Here is another very well done pdf :shh: 8-)

https://riptutorial.com/Download/autohotkey.pdf

cheers
by SpeedMaster
17 Oct 2018, 19:27
Forum: Ask For Help
Topic: Actually remove needle from haystack? Topic is solved
Replies: 3
Views: 76

Re: Actually remove needle from haystack? Topic is solved

The result is: --------------------------- Found fire Haystack is The red firetruck. --------------------------- What would cause it to result in this: --------------------------- Found fire Haystack is The red truck. --------------------------- ;) :arrow: Regexreplace() #SingleInstance force Hayst...
by SpeedMaster
17 Oct 2018, 02:16
Forum: Ask For Help
Topic: Format built-in variable (A_Index) to always include at least four digits
Replies: 4
Views: 50

Re: Format built-in variable (A_Index) to always include at least four digits

WeThotUWasAToad wrote:
16 Oct 2018, 22:13
Apparently I'm still confused ...

Syntax error... :|

Code: Select all

var := 1 

msgbox,  % Format ("{: 04}", var)      "`n`n expression without any function call"

msgbox,  % format("{: 04}", var)       "`n`n expression with a function call"

return
Cheers
by SpeedMaster
09 Oct 2018, 14:18
Forum: Ask For Help
Topic: Differentiate between "empty" variable, and non-variable? Topic is solved
Replies: 7
Views: 117

Re: Differentiate between "empty" variable, and non-variable? Topic is solved

There is no IsVar() nor IsVariable() function in AutoHotkey. In my opinion there is no way to know if you referred to a variable in the function. :cry: However, there is a way to know if you are referring to an object (even empty object) with isobject() function example: vara:=[] varb:="" ¥(vara, v...
by SpeedMaster
09 Oct 2018, 11:35
Forum: Ask For Help
Topic: Random number generater with exceptions
Replies: 8
Views: 83

Re: Random number generater with exceptions

How can I get the generater to pick one of the known numbers and not an unknown one that is between the known. Maybe something like that. :think: Arr := [1, 4, 7, 9, 12, 15, 19, 20] q::A:=Arr.Clone() w:: if (!A.1) { msgbox, Array is now empty `nPress "Q" then "W" return } MsgBox % A.pop(ShuffleArra...
by SpeedMaster
09 Oct 2018, 09:13
Forum: Ask For Help
Topic: Is there a way to clear function stack, i.e to avoid stack overflow? Topic is solved
Replies: 4
Views: 108

Re: Is there a way to clear function stack, i.e to avoid stack overflow? Topic is solved

Here's how i interpreted Lexikos's solution into my example Yes, the main idea is to have a reachable base case in the function if (i - iLast >= 100) . explanation: https://www.youtube.com/watch?v=vPEJSJMg4jY Curious but it seems that it is not necessary to set a base case in some other languages. ...
by SpeedMaster
07 Oct 2018, 07:20
Forum: Ask For Help
Topic: Is there a way to clear function stack, i.e to avoid stack overflow? Topic is solved
Replies: 4
Views: 108

Re: Is there a way to clear function stack, i.e to avoid stack overflow? Topic is solved

Yes. Return. I tried to solve the code above with return . It works well but 1501, 2001 and 2002 are missing in the log file. :cry: I think I did something wrong somewhere. :crazy: Do you have a better solution (using recursivity) for the previous example? :think: h:=i:=0 loop, { ++i x(h) } x(n) { ...
by SpeedMaster
03 Oct 2018, 02:33
Forum: Scripts and Functions
Topic: Background power v1.30 (I made a incremental game with autohotkey.)
Replies: 17
Views: 657

Re: I made an incremental game using autohotkey

I'm not entirely sure how useful it will be in the garden since the eldervine exists. And eldervine creates a copy of 2 different plants meaning there's many variations of the resulting plant so amalgamplant.name would not work (If I understand this correctly) that's exactly why object-oriented pro...
by SpeedMaster
02 Oct 2018, 17:15
Forum: Scripts and Functions
Topic: Background power v1.30 (I made a incremental game with autohotkey.)
Replies: 17
Views: 657

Re: I made an incremental game using autohotkey

give me advice on what I should do to make it better. Espacially on how to make the code better With more than 3000 lines of code, you probably have more experience in role-playing and programming than I do. I would like to have such knowledge :cry: . I think it's time for you to move forward and l...
by SpeedMaster
02 Oct 2018, 03:22
Forum: Scripts and Functions
Topic: Background power v1.30 (I made a incremental game with autohotkey.)
Replies: 17
Views: 657

Re: I made an incremental game using autohotkey

A rich energetic sap oozes from this plant to the neighboring tiles I don't see any tiles in this game. Or maybe I missed something. :think: You have a lot of imagination, which is a good point for role-playing games. :thumbup: You should consider making ascii roguelike games. I made one some time ...
by SpeedMaster
30 Sep 2018, 15:07
Forum: Scripts and Functions
Topic: [GAME] Vintage Microsoft BASIC Game : HELLO
Replies: 1
Views: 161

[GAME] Vintage Microsoft BASIC Game : HELLO

The classic book BASIC Computer Games, published by Creative Computing 1978, inspired a generation of programmers... Interested in simulating a fake gui console . I thought about redirecting the commands of an old Microsoft Basic game. :geek: The result is quite interesting but generates a lot of fl...
by SpeedMaster
25 Sep 2018, 08:10
Forum: Ask For Help
Topic: Markdown table (example in python)
Replies: 2
Views: 88

Re: Markdown table (example in python)

Very interesting. :shock: I wonder why a markdown table formatter hasn't been done yet in AHK. Anyhow... St_Columnize() 8-) from the String Things library (by Tidbit) is the closest function you can get right now. ;) (Although the function does not manage the justification in the same way as a markd...
by SpeedMaster
21 Sep 2018, 01:29
Forum: Ask For Help
Topic: eliminate default values with regex
Replies: 1
Views: 66

Re: eliminate default values with regex

;this is what I would like to achieve >param1 .. --------------------------- , Param3 .. -------------------------------------------------------------< quick fix :roll: Text = param1 := { 1:"Test" , "Key {2": "" } , Param3 := [ {"t,e[a]s:t{b}": {1:"t,e[a]s:t{b}","t,e[a]s:t{b}": [4 ] }}] MsgBox % Re...
by SpeedMaster
17 Sep 2018, 13:43
Forum: Ask For Help
Topic: How to replace a value in a array? Topic is solved
Replies: 4
Views: 102

Re: How to replace a value in a array? Topic is solved

I was doing something different Here is a cleaner function by Tibit St_Glue() :thumbup: Var:="111,222,333" SplitArray := StrSplit(Var, ",") msgbox % splitArray[2]:=777 msgbox, % var:=st_glue(splitArray,"`,") ; String Things by Tibit ;https://autohotkey.com/boards/viewtopic.php?t=53 st_glue(array, d...
by SpeedMaster
17 Sep 2018, 08:11
Forum: Ask For Help
Topic: FileRead Numbers Only Help.
Replies: 6
Views: 128

Re: FileRead Numbers Only Help.

ThiefUK wrote:total1 + total2 + total3 + total4 (If total 2 was missing, continue to total 3 and 4, then show result).
Initialise empty variables to zero

Code: Select all

loop, 4
(!total%a_index%) ? (total%a_index%:=0)
varaall1 +=  total1 + total2 + total3 + total4
GuiControl, , allstats , %varaall1%
by SpeedMaster
16 Sep 2018, 19:02
Forum: Tips and Tricks
Topic: Storing images in the script itself and than displaying them in an animated button (picture control)
Replies: 11
Views: 460

Re: Storing images in the script itself and than displaying them in an animated button (picture control)

DRocks wrote:How do you extract this data from an image?
The storage of images in base 64 takes less space than in Hex (base 16)

You can find an encoder\decoder for base 64 here
https://autohotkey.com/boards/viewtopic.php?t=35964
by SpeedMaster
16 Sep 2018, 18:41
Forum: Ask For Help
Topic: [Gui] How to slice words from a merged string to get colored text output ?
Replies: 4
Views: 130

Re: [Gui] How to slice words from a merged string to get colored text output ?

You just need to change all characters except for the words (and vertical tabs) you want in the colored layers to spaces. It's exactly what I was looking for. Thank you. :clap: :thumbup: I made a function with it. SliceWord(text, words) It works well but it still relies on the Space() function. Can...
by SpeedMaster
15 Sep 2018, 07:50
Forum: Ask For Help
Topic: [Gui] How to slice words from a merged string to get colored text output ?
Replies: 4
Views: 130

[Gui] How to slice words from a merged string to get colored text output ?

Hello, Here is a gui with 3 layered control text and monospaced terminal font. layer 0 is white layer 1 red layer 2 green How to slice "red words" and "green words" from the white text in order to display a colored output ? :think: layer0:= white text layer1:=["worry", "face", "head", "late" , "trou...
by SpeedMaster
11 Sep 2018, 03:59
Forum: Ask For Help
Topic: Getting translations from DeepL online translator
Replies: 12
Views: 343

Re: Getting translations from DeepL online translator

I have found that DeepL is an online translator that translates much much better than the crap translation my agency provides me with to perform a Machine Translation Edit. A very good example of what an artificial neural network can do. The function provided by antonio works very well for me. 8-) ...

Go to advanced search