Sign in to follow this  
Followers 0
Dellairion

from 0 to Z

11 posts in this topic

#1 ·  Posted (edited)

why this isn't working?

HotKeySet("{F3}", "MyExit")
HotKeySet("{F2}", "Start")

$letter1 = 0
$letter2 = 0

$alphabet = StringSplit('0123456789abcdefghijklmnopqrstuvwxyz', '')

Func Start()
  Do
    For $a2 = 1 to 36
    $letter2= $alphabet[$a2]

    Send($letter1)
    Send($letter2)
    Send("{ENTER}")
    Next

    if $letter2 = "z" then
       For $a1 = 1 to 36
       $letter1 = $alphabet[$a1]
    endif

  Until  $letter1 = "z"
EndFunc

Func MyExit()
    Exit 
EndFunc
Edited by Dellairion

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

try calling the function

Need a while loop

Edit: still drinking 1st cup of coffee

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Edit: gafrost beat me to it

Edited by RazerM

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

what do you mean with need a while loop? replacing

Do

Until $letter1 = "z"

with

While $letter1 <> "z"

WEnd

sry for stopid question

Edited by Dellairion

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

You need the while loop to keep the script running so it can capture when you hit the hot keys

HotKeySet("{F3}", "MyExit")
HotKeySet("{F2}", "Start")

$letter1 = 0
$letter2 = 0

$alphabet = StringSplit('0123456789abcdefghijklmnopqrstuvwxyz', '')

While 1
  Sleep ( 100 )
Wend

Func Start()
  Do
    For $a2 = 1 to 36
    $letter2= $alphabet[$a2]

    Send($letter1)
    Send($letter2)
    Send("{ENTER}")
    Next

    if $letter2 = "z" then
       For $a1 = 1 to 36
       $letter1 = $alphabet[$a1]
    endif

  Until  $letter1 = "z"
EndFunc

Func MyExit()
    Exit 
EndFunc
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

k thnx but now i get this:

"EndIf" statement with no matching "If" statement.

I don't get it, why?

For $a1 = 1 to 36

$letter1 = $alphabet[$a1]

next <-------------------- missing from this line

Gerry

Share this post


Link to post
Share on other sites

k that works but why the $letter1 stays 0 and changes only at the end to z?

00

01

...

0y

zz

lol

HotKeySet("{F3}", "MyExit")
HotKeySet("{F2}", "Start")

$letter1 = 0
$letter2 = 0

$alphabet = StringSplit('0123456789abcdefghijklmnopqrstuvwxyz', '')

While 1
  Sleep(100)
Wend

Func Start()
  Do
    For $a2 = 1 to 36
    $letter2= $alphabet[$a2]

    if $letter2 = "z" then
       For $a1 = 1 to 36
       $letter1 = $alphabet[$a1]
       Next
    endif
    Send($letter1)
    Send($letter2)
    Send("{ENTER}")
  Next
  Until $letter1 = "z"
  Exit
EndFunc

Func MyExit()
    Exit 
EndFunc

Share this post


Link to post
Share on other sites

HotKeySet("{F3}", "MyExit")
HotKeySet("{F2}", "Start")

$letter1 = 0
$letter2 = 0

$alphabet = StringSplit('0123456789abcdefghijklmnopqrstuvwxyz', '')

While 1
  Sleep(100)
Wend

Func Start()
  Do
    For $a2 = 1 to 36
    $letter2= $alphabet[$a2]

   ;if $letter2 = "z" then
       For $a1 = 1 to 36
       $letter1 = $alphabet[$a1]
      ;Next
   ;endif
    Send($letter1)
    Send($letter2)
    Send("{ENTER}")
Next
Next
  Until $letter1 = "z"
 ;Exit
EndFunc

Func MyExit()
    Exit 
EndFunc

Is this what you want ??

Gerry

Share this post


Link to post
Share on other sites

hehe thnx for everything it works now :D

HotKeySet("{F3}", "MyExit")
HotKeySet("{F2}", "Start")

$letter1 = 0
$letter2 = 0

$alphabet = StringSplit('0123456789abcdefghijklmnopqrstuvwxyz', '')

While 1
  Sleep(100)
Wend

Func Start()
  Do
    For $a1 = 1 to 36
    $letter1 = $alphabet[$a1]

    For $a2 = 1 to 36
    $letter2 = $alphabet[$a2]

    Send($letter1)
    Send($letter2)
    Send("{ENTER}")
    Next
    Next
  Until $letter1 = "z"
EndFunc

Func MyExit()
    Exit 
EndFunc

Share this post


Link to post
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
Sign in to follow this  
Followers 0