Sign in to follow this  
Followers 0
zero57

How do u link programs.... Simolokid + Zero57

8 posts in this topic

Hey, I am wondering how do u link programs together?

I mean if u make an inputbox, how do u keep what they have putted in?

E.G.: I entered Hi into the input box and then when i click ok it transfers the Hi into a label.

Picture using text.:

_____________________

Input Box------------|

_____________________|

Please type something|

---------------------|

_____________________|

|Hi------------------|

|____________________|

|--------------------|

---------Ok----------|

_____________________|

Please forget the -'s they r just to organize the pic...

so when u put in ur desired word / sentence, u press ok.

and then the word / sentence gets into a label in the next input box.

Please help us.


[font="Arial Black"][u]zero57[/u][/font]

Share this post


Link to post
Share on other sites



dim $sometext

$sometext = "Script Start!"

While 1 = 1

    $sometext = InputBox($sometext, "InputBoxDescription", "DefaultInputText")

Wend

Each time you press OK it will put the text you wrote as the next inputbox name.

Is this what you wanted?

Share this post


Link to post
Share on other sites

The return value of the inputbox is whatever was typed in unless there is an error. Something like this.

$Return = InputBox("Test", "Input sentence")
If Not @error Then GUICtrlSetData($Label, $Return)

[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

dim $sometext

$sometext = "Script Start!"

While 1 = 1

    $sometext = InputBox($sometext, "InputBoxDescription", "DefaultInputText")

Wend

Each time you press OK it will put the text you wrote as the next inputbox name.

Is this what you wanted?

Somewhat like this. Just not so repetetitive, but i can fix that by removing the command "While"

and i wanted it to put the text in a label. U know when u make GUI's, u can add labels.... But I guess we can accept this, but first i have to wait for Simolokid's approval.

Oh and thx. I learned something about this.

Before i forget, posts can still be posted. While waiting for Simolokid's approval, We can still have more effective codes/scripts on linking programs.

The return value of the inputbox is whatever was typed in unless there is an error. Something like this.

$Return = InputBox("Test", "Input sentence")
If Not @error Then GUICtrlSetData($Label, $Return)

There is an error... it said to declare the variable called: $Label

Mind telling me what is it suppose to declare?

Or

Can u Fix that for me?

Edited by zero57

[font="Arial Black"][u]zero57[/u][/font]

Share this post


Link to post
Share on other sites

$Label is the handle to the label. Here is a full example. I moved the inputbox out of the way of the first gui. Hope this helps.

$GUI = GUICreate("GUI", 200, 200)
$Label = GUICtrlCreateLabel("", 10, 10, 150, 20)
GUISetState()

Sleep(2000)

$Return = InputBox("Test", "Input sentence", "", "", Default, Default, @DesktopWidth / 2 + 100, @DesktopHeight / 2)
If Not @error Then GUICtrlSetData($Label, $Return)

While 1
    If GUIGetMsg() = -3 Then Exit
    Sleep(10)
WEnd

[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

$Label is the handle to the label. Here is a full example. I moved the inputbox out of the way of the first gui. Hope this helps.

$GUI = GUICreate("GUI", 200, 200)
$Label = GUICtrlCreateLabel("", 10, 10, 150, 20)
GUISetState()

Sleep(2000)

$Return = InputBox("Test", "Input sentence", "", "", Default, Default, @DesktopWidth / 2 + 100, @DesktopHeight / 2)
If Not @error Then GUICtrlSetData($Label, $Return)

While 1
    If GUIGetMsg() = -3 Then Exit
    Sleep(10)
WEnd

Woah! Exactly what we need. Thx dantay9 and Neutro.

Now waiting till he comes online and approves the script. But thx man.


[font="Arial Black"][u]zero57[/u][/font]

Share this post


Link to post
Share on other sites

Your welcome.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

yeah this is getting close but more answers to come when we finished the plan too. Oh ya, if u can, please check ur mail. (On autoit forum messenger)


[font="Arial Black"][u]zero57[/u][/font]

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