pezo89 2 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. Share this post Link to post Share on other sites
AdmiralAlkex 125 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 Share this post Link to post Share on other sites
pezo89 2 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? Share this post Link to post Share on other sites
pezo89 2 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!") Share this post Link to post Share on other sites
AdmiralAlkex 125 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 Share this post Link to post Share on other sites
kaotkbliss 146 Posted November 30, 2010 should be += shouldn't it? 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
AdmiralAlkex 125 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 Share this post Link to post Share on other sites
kaotkbliss 146 Posted November 30, 2010 $o =+ InputBox("Test","Test","2") oh... hahaha 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
czardas 1,269 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 Share this post Link to post Share on other sites
trancexx 1,013 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 Share this post Link to post Share on other sites
czardas 1,269 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 Share this post Link to post Share on other sites
pezo89 2 Posted December 2, 2010 ahh i see.. thanks alot for the help fellas Share this post Link to post Share on other sites
kaotkbliss 146 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 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
Tvern 11 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. Share this post Link to post Share on other sites
kaotkbliss 146 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 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
Tvern 11 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. Share this post Link to post Share on other sites
kaotkbliss 146 Posted December 3, 2010 doh (basic math fail) 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites