pezo89 Posted November 30, 2010 Share Posted November 30, 2010 Hello, i where just wondering what the command for loop + was again? im currently reading info from a cell and posts it into word, and im trying to have it go one cell down after each time the entire script is done. also beeing able to have it set how many times it should loop $sFilePath1 = @ScriptDir & "\Jobber som skal søkes på.xlsx" ;This file should already exist $oExcel = _ExcelBookOpen($sFilePath1) $i =+1 $url = _ExcelReadCell($oExcel, 1+$i, 7);Første URL $stillingstype = _ExcelReadCell($oExcel, 1+$i, 8);FørsteFørsteStillingstype and so on, so say that i on start a script with an input bar, and inputs the number 3 and it loops it 3 times, and also on the end of each loop it goes one cell down. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 30, 2010 Share Posted November 30, 2010 A For-loop? From helpfile: For $i = 5 to 1 Step -1 MsgBox(0, "Count down!", $i) Next MsgBox(0,"", "Blast Off!") .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
pezo89 Posted November 30, 2010 Author Share Posted November 30, 2010 A For-loop? From helpfile: For $i = 5 to 1 Step -1 MsgBox(0, "Count down!", $i) Next MsgBox(0,"", "Blast Off!") yes something like that. but how can i set the "timer" myself, with an inputbox? Link to comment Share on other sites More sharing options...
pezo89 Posted November 30, 2010 Author Share Posted November 30, 2010 yes something like that. but how can i set the "timer" myself, with an inputbox? nvm figuered it out. thanks alot $o =+ InputBox("Test","Test","2") For $i =+$o to 1 Step -1 MsgBox(0, "Count down!", $i) Next MsgBox(0,"", "Blast Off!") Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 30, 2010 Share Posted November 30, 2010 Those plus+sings doesn't look right .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
kaotkbliss Posted November 30, 2010 Share Posted November 30, 2010 should be += shouldn't it? 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 30, 2010 Share Posted November 30, 2010 Then I must be missing something. $o = InputBox("Test","Test","2") For $i = 1 to $o MsgBox(0, "Count down!", $i) Next MsgBox(0,"", "Blast Off!") That's how I imagine what pezo wants. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
kaotkbliss Posted November 30, 2010 Share Posted November 30, 2010 $o =+ InputBox("Test","Test","2") oh... hahaha 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
czardas Posted November 30, 2010 Share Posted November 30, 2010 Just to clarify: $o =+1 sets $o equal to 1 (the + sign is not needed => $o = 1) $o =-1 sets $o equal to -1 $o += 1 (increments the value of $o by one) $o -= 1 (decreases the value of $o by one) operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
trancexx Posted November 30, 2010 Share Posted November 30, 2010 Just to clarify: $o =+1 sets $o equal to 1 (the + sign is not needed => $o = 1) $o =-1 sets $o equal to -1 $o += 1 (increments the value of $o by one) $o -= 1 (decreases the value of $o by one) And /= does that other thing and *= other other. Btw, what's $o here? $o =+-+-+-+-+-++++++++++-----------------------++-+ 8 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
czardas Posted November 30, 2010 Share Posted November 30, 2010 And /= does that other thing and *= other other. Btw, what's $o here? $o =+-+-+-+-+-++++++++++-----------------------++-+ 8 I have no idea. Somehow I don't think it's +-+-+-+-+-++++++++++-----------------------++-+ message box. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
pezo89 Posted December 2, 2010 Author Share Posted December 2, 2010 ahh i see.. thanks alot for the help fellas Link to comment Share on other sites More sharing options...
kaotkbliss Posted December 2, 2010 Share Posted December 2, 2010 Btw, what's $o here? $o =+-+-+-+-+-++++++++++-----------------------++-+ 8 my guess is -8 (because there are more - than +) *and after entering that line into a script and inserting a msgbox to display the result... I was right 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Tvern Posted December 2, 2010 Share Posted December 2, 2010 Actually it's negative because there is an uneven amount of negatives. The plusses do nothing. +8 = 8 +-8 = -8 --8 = 8 ---8 = -8 +++++++++++++++++++++++++++-8 = 8 etc. Link to comment Share on other sites More sharing options...
kaotkbliss Posted December 2, 2010 Share Posted December 2, 2010 (edited) run this code and see what you get... $o =+-+-+-+-+-++++++++++-----------------------++-+ 8 MsgBox(0,"",$o) *edit* wait a sec, my answer was -8 and you said "actually it's negative..." same answer. Edited December 2, 2010 by kaotkbliss 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Tvern Posted December 2, 2010 Share Posted December 2, 2010 Actually it's negative because......was a response to(because there are more - than +)Your answer was right, but the reasoning wasn't. Link to comment Share on other sites More sharing options...
kaotkbliss Posted December 3, 2010 Share Posted December 3, 2010 doh (basic math fail) 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now