AutoHotkey Community

It is currently May 27th, 2012, 12:54 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: December 29th, 2009, 2:26 am 
I need to take real estate pin numbers example: 15-15-414-027-0000

and remove the dashes and then paste them into fields, two digits, two digits, three digits, three digits, and four digits. it's wearing my fingers down the way I'm doing it now -- by hand. My thinking is you create some kind of temporary file and it stores the number temporarily, removing the dashes, and then pasting them in the order described above into the fields.

But this one is way beyond me, as is most of this stuff. Any help would be appreciated


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 29th, 2009, 2:43 am 
check the help for:
InputBox
SubStr()
Send


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 29th, 2009, 2:45 am 
Offline

Joined: November 28th, 2009, 4:45 am
Posts: 3089
Code:
Var=15-15-414-027-0000
StringMid, P1, Var, 1 , 2
StringMid, P2, Var, 4 , 2
StringMid, P3, Var, 7 , 3
StringMid, P4, Var, 11 , 3
StringMid, P5, Var, 15
Send %P1%{Tab}%P2%{Tab}%P3%{Tab}%P4%{Tab}%P5%
Not that hard to divide or paste but you need to decide how you want to get the numbers into the script, and how you want to trigger it.
FileRead
InputBox
Clipboard
HotKeys/Stings


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 29th, 2009, 3:32 am 
Offline

Joined: December 8th, 2006, 5:17 am
Posts: 248
Location: Sydney Australia
Here is a simple example to split a single line into its parts, assuming the delimiter is a '-'

Code:
theVar=15-15-414-027-0000
Loop, Parse, theVar, -
   {
   msgbox This is field %A_Index% containing the value of %A_LoopField%
   }
Msgbox Outta loop

_________________
Paul O


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: Bing [Bot], Exabot [Bot], WillTroll, XstatyK and 24 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