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 

clipboard math

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
TheLostBoy



Joined: 18 Apr 2005
Posts: 14
Location: WI, USA

PostPosted: Sun May 15, 2005 9:39 am    Post subject: clipboard math Reply with quote

Ok so I'm all busy as a bee coding out a script when all of a sudden I run into a brick wall *thud* Here is my code snippet then an explaination...

Code:
   Send, {tab 2}
   clipboard =
   ClipWait, 5
   Send, ^x
   DBN = %clipboard% * 2
   Send, %DBN%
   MouseMove, 222, 108, 30


Basically what I'm doing is creating a script to help out my niece with her math homework.. kinda like a math tutor. AAAAAAAANYWHO.. I have it so it automatically tabs over twice to the input box with a number already in it.. lets say.. 100 (easy numbers YAY!) it then cuts the number out and multiplys it by two.. or so I thought. The DBN (DouBle Number) var isn't effectively multiplying the 100 (or other variable number) in the box but rather just cutting it and not replacing it with the answer of 200..

So long story short I just want to take the numbers off the clipboard and multiply them by two (well its going to be more but to multiply it by one it wont lemme know if i'm doing it right lol) If any of all that made sense (its like 436am) to one of y'all out there could I get a little help? Very Happy

Thnx!
_________________
"It was when I found out I could make mistakes that I knew I was on to something."
--Ornette Coleman
Back to top
View user's profile Send private message Visit poster's website AIM Address
polyethene



Joined: 11 Aug 2004
Posts: 5248
Location: UK

PostPosted: Sun May 15, 2005 10:35 am    Post subject: Reply with quote

Should be using an expression:
Code:
DBN := Clipboard * 2
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TheLostBoy



Joined: 18 Apr 2005
Posts: 14
Location: WI, USA

PostPosted: Mon May 16, 2005 7:50 am    Post subject: Reply with quote

Thnx much titan... apparently I'm a moron because I did have the := but had the %'s on there... i hate painfully obvious airers (<--bad joke)
_________________
"It was when I found out I could make mistakes that I knew I was on to something."
--Ornette Coleman
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
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