AutoHotkey Community

It is currently May 26th, 2012, 10:41 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: August 15th, 2008, 12:20 pm 
Offline

Joined: August 6th, 2008, 12:19 pm
Posts: 13
hey ive spent an hour trying to get this right but can someone tell me what am i doing wrong here its just a code snippet , i am trying to get it to select a file from a folder and load it

THIS selects file but how do i load it i cant get it to load
Code:
 F2::
FileSelectFile, SelectedFile, 3, , Open a file,TextDocuments(*.txt;*.doc)
FileRead,Mouse_moves,SelectedFile
StringReplace, Mouse_data, Mouse_moves, `n, @, All


HOW EVER THIS WORKS if i put a static name to a txt file
Code:
F2::
FileRead,mouse_moves, tuna.txt
StringReplace, Mouse_data, Mouse_moves, `n, @, All


[Title edited. Please write descriptive titles for your topics. ~jaco0646]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 15th, 2008, 12:24 pm 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
You need to add % to SelectedFile to indicate it is a variable:

Code:
FileRead, Mouse_moves, %SelectedFile%

_________________
"Anything worth doing is worth doing slowly." - Mae West
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 15th, 2008, 12:41 pm 
Offline

Joined: August 6th, 2008, 12:19 pm
Posts: 13
thanks mate for your kind help btw what do you do for living lol


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 15th, 2008, 1:44 pm 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
AutoHotkey :lol:

_________________
"Anything worth doing is worth doing slowly." - Mae West
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: bobbysoon, BrandonHotkey, iBob35555VR, Tilter_of_Windmills, Yahoo [Bot] and 60 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