Jump to content

Why does it returns '0' ?


AlmarM
 Share

Recommended Posts

Hi,

Why does my var returns '0'?

$a = Number(00000000)
MsgBox(0, "", $a)

$b = 00000000
MsgBox(0, "", $B)

$c = ClipPut(00000000)
MsgBox(0, "", ClipGet())

I want it to return '00000000'.

AlmarM

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

$x = 1

$c = ClipPut(StringFormat("%08s\n", $x))

MsgBox(0, "", ClipGet())

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Whahaha, I fixed it with an other way.

AlmarM

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

I did it this way:

(FileWrite is because the example)

$i = 0

While 1
    _Check($i)
    FileWrite(@DesktopDir & "\Test.txt", $i & @CRLF)
    $i += 1
    If $i = 99999999 Then
        Msgbox(0, "", "Done!")
        Exit
    EndIf
WEnd

Func _Check($i)
    If StringLen($i) = 2 Then
        FileWrite(@DesktopDir & "\Test.txt", "000000")
    ElseIf StringLen($i) = 3 Then
        FileWrite(@DesktopDir & "\Test.txt", "00000")
    ElseIf StringLen($i) = 4 Then
        FileWrite(@DesktopDir & "\Test.txt", "0000")
    ElseIf StringLen($i) = 5 Then
        FileWrite(@DesktopDir & "\Test.txt", "000")
    ElseIf StringLen($i) = 6 Then
        FileWrite(@DesktopDir & "\Test.txt", "00")
    ElseIf StringLen($i) = 7 Then
        FileWrite(@DesktopDir & "\Test.txt", "0")
    ElseIf StringLen($i) = 8 Then
        FileWrite(@DesktopDir & "\Test.txt", "")
    Else
        FileWrite(@DesktopDir & "\Test.txt", "0000000")
    EndIf
EndFunc

AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

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