Jump to content

script to manipulate Koda document


Recommended Posts

Hi this script displays amessage box asking a user to choose their gender. once they have done this I need to give the user a second chance incase they clicked on the wrong gender.

a msg box is displayed asking to confirm. I'm stuck on how to create the loop from this messagebox,and how to reposition

the msg box so that it appears on top and in line with the main window.any pointers would be apprieciated thanks!

#include <buttonconstants.au3>
#include <guiconstantsex.au3>
#include <windowsconstants.au3>
#Region ### START Koda GUI section ### Form=gender select.kxf

$Form2 = GUICreate("Select Gender", 279, 213, 361, 262)
GUISetBkColor(0xA0A0A4)
$GroupBox1 = GUICtrlCreateGroup("", 24, 1, 233, 193)
GUICtrlSetBkColor(-1, 0xA0A0A4)
$label2 = GUICtrlCreateLabel("or", 135, 168, 15, 17)
GUICtrlSetBkColor(-1, 0xA0A0A4)
$Label1 = GUICtrlCreateLabel("Click on the Gender of the New User", 48, 136, 177, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Male", 30, 163, 75, 25, $BS_PUSHLIKE)
GUICtrlSetBkColor(-1, 0x0054E3)
$Button2 = GUICtrlCreateButton("Female", 173, 163, 75, 25, $BS_PUSHLIKE)
GUICtrlSetBkColor(-1, 0xFF00FF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
   $msg = GUIGetMsg()

   Switch $msg
    Case $GUI_EVENT_CLOSE
    ;insert code here
     MsgBox(4, "", "Are you sure ? This will Install the Default settings")
            ;I would like to install from here or go back to the beging dependent on the response to
            ;the yes or no buttons displayed by the msgbox4 function. yes =instal and exit no = go back to the begining
            ;of selection routine.
            ;I need the msgbox to be displayed in line with and on top of the main window

Exit
Case $Button1
_maleFunction()
Case $Button2
_femaleFunction()
   EndSwitch
WEnd

Func _maleFunction()
   ;insert code here
    MsgBox(4, "", "Are you sure about Installing settings for a Male ?")
            ;I would like to install from here or go back to the beging dependent on the response to
            ; the yes or no buttons displayed by the msgbox4 function. yes =install and exit,no = go back to the begining
            ;I need the msgbox to be displayed in line with and on top of the main window
            ;I need to store the response into a variable for later use

   Exit
EndFunc

Func _femaleFunction()
   ;insert code here
   MsgBox(4, "", "Are you sure about Installing Female settings?")
            ;I would like to install from here or go back to the beging dependent on the response to
            ; the yes or no buttons displayed by the msgbox4 function. yes =install and exit, no = go back to the begining

   Exit
EndFunc

vxpgs3b.au3

Edited by Melba23
Added code tags
Link to comment
Share on other sites

  • Moderators

Boss007,

When you post code in future please use Code tags - put [autoit] before and [/autoit] after your posted code. Then you get the code in a nice scrolling box - as you can see above where I have added them for you. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Boss007,

When you post code in future please use Code tags - put

before and
after your posted code. Then you get the code in a nice scrolling box - as you can see above where I have added them for you. ;)

M23

ok! thank you. I was going to ask about that.
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...