Simple Arrays for Dummies from a non-programmer

Post a reply


In an effort to prevent automatic submissions, we require that you type the text displayed into the field underneath.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Simple Arrays for Dummies from a non-programmer

Re: Simple Arrays for Dummies from a non-programmer

Post by BoBo » 01 Jul 2017, 12:33

I like tying everything to a hotkey so I can easily hit a button and have my action execute, then edit the code, hit the other hotkey to reload, then repeat. Just saves me a lot of time.
Exactly the way I've done it as well, what is fine as long as you don't want to #Include that file within another script were it will throw errors like "duplicate hotkeys" because you use your favourite hotkeys all over the place etc. :shifty: for that reason I've stolen Trubbleguy's test scenario :thumbup:
It's working this way (let's assume your editor allows to execute a script with its own build in keyboard shortcut) ...

Code: [Select all]GeSHi © Codebox Plus

If (A_Scriptname = "<the script name here>"){ ; that section will only get executed via its host file, while getting ignored if included and executed via another script
MsgBox % function("Hello World")
ExitApp
}

function(msg){
Return % msg
}

Re: Simple Arrays for Dummies from a non-programmer

Post by Joe Glines » 17 Feb 2016, 09:29

Sorry- I've been slammed at work. Those are 4 hotkeys for two main commands. The first two (right alt and Browser_Forward) will reload the script. The second two (Right control and Browser_back) will "launch" the actions beneath.

I like tying everything to a hotkey so I can easily hit a button and have my action execute, then edit the code, hit the other hotkey to reload, then repeat. Just saves me a lot of time.

Re: Simple Arrays for Dummies from a non-programmer

Post by guest3456 » 17 Feb 2016, 08:45

kwibus wrote:@Joe Glines:
Thanks! I am also at the very start now. My first question is about these lines:

Code: [Select all]GeSHi © Codebox Plus

RAlt::
Browser_Forward::Reload
RControl::
Browser_Back::


What is there use? Are these necessary?


those are the start of hotkey definitions. anytime you see a keyname followed by the double colon, that indicates the start of a hotkey for that key
https://autohotkey.com/docs/Hotkeys.htm

in this case, if i had to guess, it looks like those don't belong in this script and are probably a mistake or left over from his testing

Re: Simple Arrays for Dummies from a non-programmer

Post by kwibus » 17 Feb 2016, 08:42

@Joe Glines:
Thanks! I am also at the very start now. My first question is about these lines:

Code: [Select all]GeSHi © Codebox Plus

RAlt::
Browser_Forward::Reload
RControl::
Browser_Back::


What is there use? Are these necessary?

Re: Simple Arrays for Dummies from a non-programmer

Post by SnowPickle » 19 Nov 2014, 18:07

Thanks Great Video, very thorough and great examples.

Re: Simple Arrays for Dummies from a non-programmer

Post by budRich » 01 Jan 2014, 21:17

Cool, nice work! This will surely help people getting started with arrays.

Re: Simple Arrays for Dummies from a non-programmer

Post by Joe Glines » 01 Jan 2014, 21:05

Thanks! I didn't expect the video to be so long but I'm glad it might help. I used Camtasia to record the video.

Re: Simple Arrays for Dummies from a non-programmer

Post by vahju » 01 Jan 2014, 16:02

Great video and script.
I haven't had a need to use arrays yet but thanks to this post may start using them.

Did you use skype to do the recording?

Simple Arrays for Dummies from a non-programmer

Post by Joe Glines » 30 Dec 2013, 22:11

While the forum is awesome at providing great information and there are a ton of people that have helped solve many of my problems, one of my few gripes is that I often get advice that is probably easy for a programmer to follow however, given I'm new to programming, I find it very hard to follow.

I'd been working with both Simple and Associative arrays lately and many examples I found in the forum as well as AutoHotKey help were difficult for me to follow.

Thus I decided to take a crack at writing a tutorial from the non-programmer perspective. I'm sure some of my terminology is not correct (and some of it might flat out be wrong) but the below script works in the way that I describe in the video which I hope some other non-programmers will find helpful.

Below is the script I use in this video. With any luck you will find it helpful in understanding how to use simple arrays in AutoHotKey.

Spoiler

Top