Sign in to follow this  
Followers 0
AlphaWolf

Answers as values?

7 posts in this topic

Hi,

I'm making a new program to help people get around the london underground (A big train network) and needed some help, so ive come to you guys, so far i've got:

#include <GuiConstantsEx.au3>
#include <AVIConstants.au3>
$destination = "mylogo.jpg"

SplashImageOn("", $destination, 200, 100, -1, -1, 1)
Sleep(5000)
SplashOff()

GuiCreate("Underground", 400, 400)



GuiCtrlCreateMenu("File")
GuiCtrlCreateMenu("Help")

$contextMenu = GuiCtrlCreateContextMenu()
GuiCtrlCreateMenuItem("Context Menu", $contextMenu)
GuiCtrlCreateMenuItem("", $contextMenu);separator
GuiCtrlCreateMenuItem("&Properties", $contextMenu)




GUIStartGroup()
GuiCtrlCreateList("", 5, 190, 100, 90)
$From = GuiCtrlSetData(-1, "Station1|Station2|Station3, "Station1")


GuiCtrlCreateList("", 295, 190, 100, 90)
$To = GuiCtrlSetData(-2, "Station1|Station2|Station3", "Station2")

GuiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
WEnd

What id like is a London underground map (I know how to do this. just i need help finding one, i need the one that you see ON the train, with only about 20/30 stops, if people know what im describing).

I would also like help on a button in between the two lists, and an output at the bottom.

The output will put together the to and from, and come up with a number, so to tell you how long it should take to get from one to the other, I only have 3 stations ATM, so it only has to be simple.

Hope you can help


Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

It is best not to open a second (technically 3rd) topic for the same issue.

http://www.autoitscript.com/forum/index.ph...st&p=564276

Just find and post to your original topic to bump it to the first page of the forum - but wait at least 24 hours to do so.

If you created a new topic to make a new topic title --- you should be able to edit the title of your original post.

You should be able to delete your original two topics... as long as no one has replied to them. If the delete button is not down by the edit button then you might not have enough posts in the forum yet.

Have you searched with Google's Image search for your map of interest? Or am I not understanding what you are after?

http://images.google.com/images?hl=en&...sa=N&tab=wi

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Thanks,

I'm very sorry for posting the same topic 3 times, but i didnt know you could just re-post on it, it wont happen again, i promise, and i have searched google, but im not 100% of what its called :P

Sorry

Joe


Share this post


Link to post
Share on other sites

So,

does anybody have any ideas?


Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Do you mean like this?

Click Me

I do meen a little like that, but only with the centre, and i dont want to edit it, it would just have lines coming off, its a bit smaller, thanks for trying.

Edit: Does anybody know how to on startup on the program, it checks online for a file, that checks the current verison, and downloads new files, if it isnt the correct version?

Edited by AlphaWolf

Share this post


Link to post
Share on other sites

I do meen a little like that, but only with the centre, and i dont want to edit it, it would just have lines coming off, its a bit smaller, thanks for trying.

Edit: Does anybody know how to on startup on the program, it checks online for a file, that checks the current verison, and downloads new files, if it isnt the correct version?

If you want a simple diagram like they have on the train so you can see which station is next, or how many stops away, then you could easily create your own image and then add buttons and labels with AutoIt.

You could have something like this

#include <GuiConstantsex.au3>
#include <windowsconstants.au3>
$gui = GUICreate("Gnu's little helper", 400, 300, 200, 200)
Global $b[3], $c[3]
GUICtrlCreateLabel("", 20, 70, 370, 10)
GUICtrlSetBkColor(-1, 0x00aabb)
GUICtrlSetState(-1, $GUI_DISABLE)
$b[0] = GUICtrlCreateButton("Fichley Central", 30, 55, 100, 40)
GUICtrlSetBkColor(-1, 0xffffff)
$b[1] = GUICtrlCreateButton("East Finchley", 150, 55, 100, 40)
GUICtrlSetBkColor(-1, 0xffffff)
$b[2] = GUICtrlCreateButton("Highgate", 270, 55, 100, 40)
GUICtrlSetBkColor(-1, 0xffffff)

GUICtrlCreateLabel("", 20, 170, 370, 10)
GUICtrlSetBkColor(-1, 0x00aabb)
GUICtrlSetState(-1, $GUI_DISABLE)
$c[0] = GUICtrlCreateButton("Fichley Central", 30, 155, 100, 40)
GUICtrlSetBkColor(-1, 0xffffff)
$c[1] = GUICtrlCreateButton("East Finchley", 150, 155, 100, 40)
GUICtrlSetBkColor(-1, 0xffffff)
$c[2] = GUICtrlCreateButton("Highgate", 270, 155, 100, 40)
GUICtrlSetBkColor(-1, 0xffffff)

Global $bset = 0, $cset = 0
GUISetState()
$blab = GUICtrlCreateLabel("", -100, 10, 10, 50, $WS_CLIPSIBLINGS)
GUICtrlSetBkColor(-1, 0xffff00)
GUICtrlSetState(-1, $GUI_DISABLE)
$clab = GUICtrlCreateLabel("", -100, 10, 10, 50, $WS_CLIPSIBLINGS)
GUICtrlSetBkColor(-1, 0xffff00)
GUICtrlSetState(-1, $GUI_DISABLE)
$hlab = GUICtrlCreateLabel("", -400, 10, 10, 10, $WS_CLIPSIBLINGS)
GUICtrlSetBkColor(-1, 0xffff00)
GUICtrlSetState(-1, $GUI_DISABLE)

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case - 3
            Exit
        Case $b[0] To $b[2]
            For $n = 0 To 2
                GUICtrlSetBkColor($b[$n], 0xffffff)
            Next
            GUICtrlSetBkColor($msg, 0xbbffee)
            $bset = $msg
            If $cset > 0 Then drawlink($bset, $cset)
        Case $c[0] To $c[2]
            For $n = 0 To 2
                GUICtrlSetBkColor($c[$n], 0xffffff)
            Next
            GUICtrlSetBkColor($msg, 0xbbffee)
            $cset = $msg
            If $bset > 0 Then drawlink($bset, $cset)
    EndSwitch

    
WEnd

Func drawlink($bb, $cc)
    $bp = ControlGetPos($gui, "", $bb)
    ControlMove($gui, "", $blab, $bp[0] + 40, 90)
    $cp = ControlGetPos($gui, "", $cc)
    ControlMove($gui, "", $clab, $cp[0] + 40, 130)
    If $bp[0] > $cp[0] Then
        $temp = $bp[0]
        $bp[0] = $cp[0]
        $cp[0] = $temp
    EndIf
    
    
    ControlMove($gui, "", $hlab, $bp[0] + 40, 130, $cp[0] - $bp[0], 10)
EndFunc  ;==>drawlink

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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