Jump to content

how to calculate a variable


Recommended Posts

hi

this is my script so far.

Send("{CTRLDOWN}")
Send("{c}")
Sleep(2000)
Send("{2}")
Send("{CTRLUP}")
Sleep(1000)
MouseClick("left",1044, 163)
Sleep(2000)
MouseClick("left",321, 42)
Sleep(500)
Send("http://erepublik.se/memberlist.php?start=")
$number = ClipGet()
$number - 1

what this script is supost to do is to take a number from a google docs and take that number -1 befor writing it out.

exampel the number is 351 the script copies that number from google docs and make it to variable $number and take the number 351 - 1 = 350. so the variable $number will be = 350

that you easy can se that will not happen if you run the script.

the questions is how can i make the number that the script is coping in to a variable?

and if that is posible how can i calculate the variable so it will take a way 1 like the exampel (351 - 1 = 350) ?

i have read a litte about clipGet but do not understand much and maby that have something to do with it?

sorry for bad english and i relly hope that you understands me and are willing to help ;)

Regards /// Rakarna

Link to comment
Share on other sites

maybe this is what you are asking

$number-=1
;OR
$number=$number - 1

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

if the control is an Edit, RichText Edit, Listbox or ComboBox then ControlCommand would be more efficient

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

Send("^c")

this will send a Ctrl + c

also, if we knew where you are trying to copy this information from, there might be a more effective way of gathering this info

thanks for the tip (send(^c)) i have a list of numbers in a google docs dokument the numbers are between 1 - 7951 and i want the script to take one number at the time. the problem is that when i want the script to copy ea number i want it also to take away 1 from that number (exampel if the number is 301 it will take away one - 1 = 300), as far as i know that can only be done if i somehow make the copyed number into a variable and then make a ($number = $number - 1

if the control is an Edit, RichText Edit, Listbox or ComboBox then ControlCommand would be more efficient

how can i se if google docs is a edit, richtext edit, lisbox or combobox program?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...