AutoHotkey Community

It is currently May 27th, 2012, 1:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 49 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Autohotkey extreme noob
PostPosted: January 19th, 2010, 5:41 am 
I know you probably hear this a lot, but just hear me out please.
I have just discovered this site and program.
The point of this topic is to lead me in the right direction.
I have 0 experience in programming or any advanced computer actions.
I have read the entire tutorial, read the script tutorial and looked at other posts.
I just cant seem to grasp the concept of writing this stuff.
I am just a basic PC user that plays games and enjoys being on the computer, but I REALLY want to learn how to use AutoHotKey to my fullest extent.
I just don't know where to start.
The Quick Start guide just drops me right in not knowing the commands and how it all work.

Like I said in the beginning, you probably get this a lot, but please help a fellow future AutoHotKey user(I hope to be)

Thanks in advance.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2010, 7:43 am 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
Hello, WhatsAusername!!!

Welcome to the world of AHK!!!
You are just in the right place!

I myself am a noob, even though I've been around for quite a
while. Play with some examples for the "Help" file, that's how
I was starting out - it will help you a lot.

In case you really don't get anything there, go ahead and ask
questions. Be sure to quote that piece of the text or code that
you don't understand.

When asking questions, be extremely polite and respectful toward
those who will be answering your questions. There are a lot of
extremely wise and experienced gurus here, but they aren't that
willing to answer right away, especially if you are acting in such a
way as if they were supposed to.


Last edited by Benny-D on January 19th, 2010, 9:39 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2010, 10:06 am 
Offline

Joined: September 2nd, 2006, 6:39 am
Posts: 279
Location: Scotland
The easiest way to learn is from examples. One script at a time.

Where do you want to start? What do you want your script to do?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2010, 9:04 pm 
Thanks for your replies guys. I am re-reading the tutorial and trying to learn it one step at a time.
I want to start from the very beginning.
Knowing what it's all about etc...

So far what I don't understand is this

Code:
Run %A_ProgramFiles%\Winamp\Winamp.exe


What is that "%A_ProgramFiles%"?
Where did it come from?
What does it mean?

Thanks


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2010, 9:15 pm 
WhatsAusername wrote:
Thanks for your replies guys. I am re-reading the tutorial and trying to learn it one step at a time.
I want to start from the very beginning.
Knowing what it's all about etc...

So far what I don't understand is this

Code:
Run %A_ProgramFiles%\Winamp\Winamp.exe


What is that "%A_ProgramFiles%"?
Where did it come from?
What does it mean?

Thanks

It's a built-in variable in AHK that contains the path to the "Program Files" (VISTA) and Programs (XP) - folder. So this will be like this on my computer for example:

Code:
Run, D:\Program Files\Winamp\Winamp.exe

All the built-in Variables in AHK begin with the prefix A_ .


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2010, 2:01 am 
Ok, got it, thanks.
But I still don't understand what the "%A_.....%"is.
The percents are what I am confused about.
What do they do?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2010, 2:18 am 
Offline

Joined: December 28th, 2006, 9:46 am
Posts: 440
The percent signs surround variables.

So you put %A_ProgramFiles% into a script and autohotkey sees it as the direct path to your program files (usually c:\program files)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2010, 2:22 am 
Offline

Joined: March 10th, 2008, 12:55 am
Posts: 1907
Location: Minnesota, USA
Variable & Expressions
above is a massive list of all the "A_" variables.
also describes how to use/create variables and what the %'s do.

Quote:
... "Program Files" (VISTA) and Programs (XP) - folder ...

lies. on windows XP it's Program Files too. C:\Program Files\

also, register here on the forums. it'll help you get help.

_________________
rawr. be very afraid
*poke*
Note: My name is all lowercase for a reason.
"I think Bigfoot is blurry, that's the problem. It's not the photographer's fault, Bigfoot is blurry. So there's a large, out-of-focus monster roaming the countryside."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2010, 3:21 am 
Offline

Joined: June 28th, 2007, 1:08 am
Posts: 662
Hi there and welcome to the community.

I noticed that you said that you read the tutorial in your first post. Is that the included tutorial in the help file, or This tutorial thread?

Both are great resources and should be completed at your most comfortable pace.

I really like the structure of the thread that I linked above, as it jumps right into useful stuff that is very easy to learn, and gradually steps up to more complex concepts as you go.

I would suggest taking it nice and slow, especially since it doesn't seem like you have any prior programming/scripting experience. Spend the first couple days playing with hotkeys/hotstrings before stepping up to variables and expressions.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2010, 5:36 am 
Offline

Joined: January 20th, 2010, 5:25 am
Posts: 5
Thanks for the posts guys.
I'm WhatsAusername

@Elesar
I've read the help tutorial 1 time so far and am re-reading and taking it slowly this time.
I've seen the tutorial thread and am following what jaco0646 said.

@tidbit
I checked out that list and know what the percents are. Thanks.
I still don't understand this.
To be more exact, I don't understand where the code "A_ProgramFiles".
Why is it A?
I get the Program files part. It's a path to your program files, but I'm guessing the A is the variable?
What part does it play?

@adamrgolf
I think what I'm trying to do here is find a pattern in scripting.
Is there one?
The only thing I'm ever really confused about is what each symbol means and what is does and when to use it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2010, 6:26 am 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
Arlight1 wrote:
Why is it A?

Well, to my best knowledge, they are A because the one who created them named them that way. You would be way better of if in all these built-in variables you paid attention what follows right after. For example %A_Now% will give you the date and time right now (try this code yourself) :
Code:
msgbox, Here is the date and time right now: %A_Now%


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2010, 8:13 am 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2249
Location: switzerland
see all commands with examples also in autohotkey help
Quote:
C:\Programme\AutoHotkey\autohotkey.chm ;german
C:\Program files\AutoHotkey\autohotkey.chm ;english
or
run, %A_programfiles%\AutoHotkey\autohotkey.chm


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2010, 8:42 am 
Offline

Joined: June 28th, 2007, 1:08 am
Posts: 662
The A_ part is simply and easy way to identify a built-in variable that ahk makes. These are reserved variables that you can use in any script to make your life as a script writer easier.

You don't have to breakdown and understand each and every letter/symbol.

AutoHotkey is written to be high-level, meaning that it is English readable.

Anything enclosed in % are variables. Don't try to break them down farther than that, just look for where that value is assigned. If the variable starts with that A_ part, then know that ahk is assigning a value to it automatically.

You will find that most commands are very easy to understand, even if you are not familiar with that particular one yet.

The pattern you are looking for is something that you have to develop yourself as you become familiar with a language.

You should start by writing pseudo-code. Outline in plain English (or language of your choosing) what it is you want your script to do, in a fairly general term.

Next, take each section of your pseudo-code and add a bit of detail.

Keep refining the level of detail until you are fairly certain that you could write each section on its own.

Crack open the chm (compiled help manual - included in the ahk installation) and select the Index tab.

start typing in the name of what you think a command should be.
example:
I want to copy a file from one location to the next.
I type in file and get all commands starting with the word file. the 8th item in the list is FileCopy. Select that and read over the syntax of the command and look at the examples.

That is my method for writing scripts and programs, and I have developed it over about four years of scripting, building web sites and learning different programming languages (or attempting to :P)

I do this with every script that I write. Maybe not so much the pseudo-code, as I can think out most of a script before sitting at the computer, but I have the help file opened on my second monitor at least 80% of the time while I write something.

I have also found, through my profession as an electrician, that it is really easy to over-think something when trying to learn it, especially if it seems overwhelming at first.

Small steps with strong understanding will get you far, just make sure that you keep stepping, and don't stall out when you are only one or two steps off the ground.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2010, 9:25 pm 
Offline

Joined: January 20th, 2010, 5:25 am
Posts: 5
Thanks for all your posts/replies guys.
I will continue doing what you said.
Again, Thanks a lot for all the help.
Appreciate it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2010, 10:38 pm 
Offline

Joined: March 10th, 2008, 12:55 am
Posts: 1907
Location: Minnesota, USA
if you haven't, instead of just reading the manual & samples & tutorial, you should try them too.

_________________
rawr. be very afraid
*poke*
Note: My name is all lowercase for a reason.
"I think Bigfoot is blurry, that's the problem. It's not the photographer's fault, Bigfoot is blurry. So there's a large, out-of-focus monster roaming the countryside."


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 49 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], bobbysoon, Google Feedfetcher, JSLover, sjc1000, Yahoo [Bot] and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group