Sign in to follow this  
Followers 0
Eric1

I have a few questions

7 posts in this topic

#1 ·  Posted (edited)

Hi, first post :D and all that.

To the point;

Q1: How - if you can - do you insert func's into If statements?

Q2: What are the Msg Box options - 1 through 8 I think.

Q3: How would I make a script that sends a random letter, or number (or a set of letters and numbers) without repeating the same thing twice?

Q4: How could I make a a script that if I pushed a certain button, it would end, regardless of if it's done or not.

Sorry for being so new at this :)

Edited by Eric1

Share this post


Link to post
Share on other sites



Hi, first post :) and all that.

To the point;

Q1: How - if you can - do you insert func's into If statements?

Q2: What are the Msg Box options - 1 through 8 I think.

Q3: How would I make a script that sends a random letter, or number (or a set of letters and numbers) without repeating the same thing twice?

welcome to the forum.

you have it in autoit help file or try search on the forum...

if that doesn't help replay and will be answered

Share this post


Link to post
Share on other sites

welcome to the forum.

you have it in autoit help file or try search on the forum...

if that doesn't help replay and will be answered

Yeah... About that.... i did =P

I've read the help file (booooooring) but I'm gona go search it and if that doesn't work, then w/e.


Share this post


Link to post
Share on other sites

I've read the help file (booooooring)

Everytime you ask a question this is the place we will redirect you to :) You should take a quick tour through it or try the Auto 1 2 3 in my signatur, that should get you going


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

you also have examples in autoit already done scripts that helpd me a lot...

look to find help for a function or something write in auto it

for example writ msgbox click on it and then press f1 that should give you fast way help about what you wont

Share this post


Link to post
Share on other sites

Everytime you ask a question this is the place we will redirect you to :) You should take a quick tour through it or try the Auto 1 2 3 in my signatur, that should get you going

you said it right

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

could this help you a bit i made a litte script that uses the ifs, random a lot Msg Boxs and a button on a gui with a label and a hotkey

#include <GUIConstants.au3>
HotKeySet("Esc","_Exit")
;will make a form
$Form1 = GUICreate("??", 110, 90, 193, 115)
; will make a label
$Label1 = GUICtrlCreateLabel("", 32, 16, 43, 17)
; will make a button
$Button1 = GUICtrlCreateButton("??", 16, 48, 75, 25, 0)
; this makes the gui show
GUISetState(@SW_SHOW)

;main loop
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            ;will run the Go() func
            Go()
    EndSwitch
WEnd

Func _Exit()
MsgBox(0,"??","Will now exit")
Exit
EndFunc


Func Go()
    
$whatone = Random(1,2,1)
    
    If $whatone = "1" Then
        ; will run the _123() func
        _123()
    Else
        ; will run the _letters() func
        _letters()
    EndIf
EndFunc

Func _123()
    
    ;will make the number
$number = Random(1,3,1)
MsgBox(0,"??","a new number was picked")
;will make the labael show the number that was picked
GUICtrlSetData($Label1, $number )

EndFunc

Func _letters()
    
    ; is the bit to make ramdon numbers     
$abc = Random( 1, 3, 1)

; this will make the numbers in to leters
if $abc = "1" Then
    ; if the random picks 1 then it will chage it to a
    $abc = "a"

ElseIf $abc = "2" Then
    ; if the random picks 2 then it will chage it to b
    $abc = "b"

ElseIf $abc = "3" Then
    ; if the random picks 2 then it will chage it to c
    $abc = "C"

EndIf
MsgBox(0,"??","a new letter was picked")
;will make the label show the letter that was picked
GUICtrlSetData($Label1, $abc)
EndFunc
Edited by thenewkid

some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

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