AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Autohotkey extreme noob
Goto page 1, 2, 3, 4  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
WhatsAusername
Guest





PostPosted: Tue Jan 19, 2010 4:41 am    Post subject: Autohotkey extreme noob Reply with quote

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.
Back to top
Benny-D



Joined: 29 Feb 2008
Posts: 865

PostPosted: Tue Jan 19, 2010 6:43 am    Post subject: Reply with quote

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 Tue Jan 19, 2010 8:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
jps



Joined: 02 Sep 2006
Posts: 279
Location: Scotland

PostPosted: Tue Jan 19, 2010 9:06 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
WhatsAusername
Guest





PostPosted: Tue Jan 19, 2010 8:04 pm    Post subject: Reply with quote

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
Back to top
Dbof˛
Guest





PostPosted: Tue Jan 19, 2010 8:15 pm    Post subject: Reply with quote

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_ .
Back to top
Guest






PostPosted: Wed Jan 20, 2010 1:01 am    Post subject: Reply with quote

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?
Back to top
adamrgolf



Joined: 28 Dec 2006
Posts: 440

PostPosted: Wed Jan 20, 2010 1:18 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
tidbit



Joined: 09 Mar 2008
Posts: 1807
Location: Minnesota, USA

PostPosted: Wed Jan 20, 2010 1:22 am    Post subject: Reply with quote

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.
Even monkeys fall from trees. - Japanese proverb
Back to top
View user's profile Send private message
Elesar



Joined: 28 Jun 2007
Posts: 622
Location: Somewhere around 35 12N 101 49W

PostPosted: Wed Jan 20, 2010 2:21 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Arlight1



Joined: 20 Jan 2010
Posts: 5

PostPosted: Wed Jan 20, 2010 4:36 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Benny-D



Joined: 29 Feb 2008
Posts: 865

PostPosted: Wed Jan 20, 2010 5:26 am    Post subject: Reply with quote

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%
Back to top
View user's profile Send private message
garry



Joined: 19 Apr 2005
Posts: 2212
Location: switzerland

PostPosted: Wed Jan 20, 2010 7:13 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Elesar



Joined: 28 Jun 2007
Posts: 622
Location: Somewhere around 35 12N 101 49W

PostPosted: Wed Jan 20, 2010 7:42 am    Post subject: Reply with quote

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 Razz)

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.
Back to top
View user's profile Send private message
Arlight1



Joined: 20 Jan 2010
Posts: 5

PostPosted: Wed Jan 20, 2010 8:25 pm    Post subject: Reply with quote

Thanks for all your posts/replies guys.
I will continue doing what you said.
Again, Thanks a lot for all the help.
Appreciate it.
Back to top
View user's profile Send private message
tidbit



Joined: 09 Mar 2008
Posts: 1807
Location: Minnesota, USA

PostPosted: Wed Jan 20, 2010 9:38 pm    Post subject: Reply with quote

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.
Even monkeys fall from trees. - Japanese proverb
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group