Jump to content
Sign in to follow this  
Monty

Help with Links and Dates

Recommended Posts

Monty

Hi all, I have a couple of question and hoping someone can please help.

Firstly, is there a way of making a link (like a URL on webpage) on a GUI ???

And secondly, I have used "GUICtrlCreateDate". Once another/day date is chosen, what command can you use to reset this date to todays date...(please see below)

#include <GUIConstants.au3>
#include <DateTimeConstants.au3>
$gui_main = GUICreate("GUI", 400, 250)
GUISetBkColor(0xEEEEFF)
$font = "Century Gothic"
GUISetFont(10, 400, 0, $font)
$data = GUICtrlCreateInput("", 10, 25, 250, 25)
$date = GUICtrlCreateDate("", 10, 60, 250, 25, $DTS_SHORTDATEFORMAT)
$button = GUICtrlCreateButton("Reset", 10, 95, 80, 25)
GUISetState()
Do
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            GUIDelete()
        Case $msg = $button
            ; ????????????????????????????????
    EndSelect
Until Not WinExists($gui_main)

Share this post


Link to post
Share on other sites
Juvigy

1 .Check out $oIE = _IECreateEmbedded ()

2 .Check out GUICtrlSetData ( controlID, data [, default] )

Share this post


Link to post
Share on other sites
Monty

Thank you for your reply...

I tried using "GUICtrlSetData ( controlID, data [, default] )" but did not get far. Can you please show me how to use this in the my script please?

Share this post


Link to post
Share on other sites
Juvigy

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

GUIDelete()

ExitLoop

Case $msg = $button

GUICtrlSetData($date, _DateAdd("D", 1, GUICtrlRead($date)))

EndSelect

Wend

Share this post


Link to post
Share on other sites
Monty

GUICtrlSetData($date, _DateAdd("D", 1, GUICtrlRead($date)))

Worked well. Thank you.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.