Jump to content

while 1 +1 after one loop is completed


pezo89
 Share

Recommended Posts

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

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.

Link to comment
Share on other sites

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

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 :graduated:

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

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. :graduated:

Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

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...