Jump to content

inputbox .. save word ? .. change word in the below :(


Scan
 Share

Recommended Posts

hi ..

i do this code ..

while 1
$hs= InputBox("title","program","anything","",-1, -1, 750, 520,0,0)
if $hs= ("16") Then
msgbox(0,"age","you are not adult")
Else
    exit
    endif
    wend

Requests the user to enter Nummber " 16 " if do while return ;

but he will be like that in this pic

post-60184-0-85884500-1297525436_thumb.j

Fuller explanation ..

When the user enters the number "16" will show a message to the user, then the code will

Back to the beginning of the script and started to be on the form as shown !

I want to replace the word rectangle by the number 16 << mean this word at pic post-60184-0-85884500-1297525436_thumb.j

How I could do,

And another query ?

Is it possible to save the words that are written inside Inputbox

thx for help : )

Link to comment
Share on other sites

  • Moderators

Scan,

I want to replace the word rectangle by the number 16

So put it in the InputBox parameter: ;)

While 1
    $hs = InputBox("title", "program", 16, "", -1, -1, 750, 520, 0, 0)
    If Number($hs) < 17 Then
        MsgBox(0, "age", "you are not adult")
    Else
        Exit
    EndIf
WEnd

Note that as InputBox returns a string it is best to convert it to a number before comparing - and I also assumed that anyone younger than 16 is a problem too so I changed the comparison value. :idiot:

Is it possible to save the words that are written inside Inputbox

What do you think is in variable $hs? Or do you want to save the content to a file? In that case look at FileWrite or IniWrite. :)

M23

P.S. How do you manage to read your code when it is so badly formatted? Have you never heard of Tidy? :idiot:

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

Scan,

So put it in the InputBox parameter: ;)

While 1
    $hs = InputBox("title", "program", 16, "", -1, -1, 750, 520, 0, 0)
    If Number($hs) < 17 Then
        MsgBox(0, "age", "you are not adult")
    Else
        Exit
    EndIf
WEnd

Note that as InputBox returns a string it is best to convert it to a number before comparing - and I also assumed that anyone younger than 16 is a problem too so I changed the comparison value. :idiot:

What do you think is in variable $hs? Or do you want to save the content to a file? In that case look at FileWrite or IniWrite. :)

M23

P.S. How do you manage to read your code when it is so badly formatted? Have you never heard of Tidy? :D

thx for replay MB32 : $

look ,

Asked the user to enter No. 16 ok ?

When No. 16 is inserted accept script that shows the message to ..

After that,

When due ( inputbox ) to the main screen , due again the same word <<<< ( anything )

I want to replace the floor of this with number entered by the user ?

it's clear ?

What do you think is in variable $hs?

it's just a chr lool ..

and about a save the word ..

Note : i mean the No that user entry can it save at the blink ( Like when u search at google .. some word still ,not remove )

Details : tha't mean even i put uset number in blink number 16 entry after then show you are not adult but i need to know how to tha't user number 16 entry then did no't show again massege (you are not adult) give me step ..

i hope u understand :idiot:

Link to comment
Share on other sites

P.S. How do you manage to read your code when it is so badly formatted? Have you never heard of Tidy?

MB32,

You know well that when somebody want to learn something with another language ! it will be haredly for him : )

language would be difficult for the beginning of the journey

But I was determined to complete my way to learn this programming language,

I don't know what is really the reason for love to this .. and drifted, without feeling

I mind my feelings because I am still a beginner in this language

:);)

Link to comment
Share on other sites

  • Moderators

Scan,

I want to replace the floor of this with number entered by the user

i mean the No that user entry can it save at the blink

i hope u understand

Do you mean that you want to save the username and the entered age so that when the user tries again you can insert the same value? :)

If so then I suggest you use an ini file which saves data in this format:

[Section Title]
Key1=Value1
Key2=Value2

Look at the Ini* commands in the Help file for more details.

If that is not what you meant then try writing in your native language and use Google Translate before posting - perhaps that will reduce the fog.

Ou si tu parle francais, ecrit dans cette langue - je suis bi-langue. ;)

(Or if you speak French, write in that language - I am bilingual)

M23

P.S. When you reply please use the "Add Reply" button at the top and bottom of the page rather then the "Reply" button in the post itself. That way you do not get the contents of the previous post quoted in your posts - which are already quite long enough! :idiot:

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

OK! I have looked at the posts leading up to this and am a little confused to what you want to do. To be honest if M23 (Melba) has helped you with little success, then I have to say I am not much help either (I have to know my limitations sometimes. :))

Plus, I missed the bat signal!

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • Moderators

guinness,

I cannot say I have helped very much - I do not really have any idea of what I am supposed to help with! :)

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

I might understand now! I haven't used InputBox in a long time, normally I use the "GUI Management" >>

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

_Main()

Func _Main()
    Local $GUI, $Input, $OK, $Cancel, $Read, $SavedInput
    $GUI = GUICreate("@User Scan", 200, 100)
    GUICtrlCreateLabel("Enter the legal Age", 2, 5, 196)
    $Input = GUICtrlCreateInput("", 2, 35, 196, 20)
    $OK = GUICtrlCreateButton("&OK", 60, 70, 65)
    $Cancel = GUICtrlCreateButton("&Cancel", 130, 70, 65)
    GUISetState(@SW_SHOW)

    While 1

        Switch GUIGetMsg()
            Case -3, $Cancel
                Exit

            Case $OK
                $Read = GUICtrlRead($Input)
                If StringIsSpace($Read) Or $Read = "" Then ContinueLoop
                $SavedInput &= $Read & @CRLF ; <<<<< I would use an Array but for now I will use this to save the Contents of the Input.
                MsgBox(0, "Saved Data of the Input", $SavedInput)
                If Not StringIsInt($Read) Then
                    GUICtrlSetData($Input, 16)
                    ContinueLoop
                EndIf
                If $Read <= 16 Then
                    MsgBox(64, "MsgBox()", $Read & " = You're not an Adult!", 0, $GUI)
                ElseIf $Read > 16 And $Read <= 150 Then
                    MsgBox(64, "MsgBox()", $Read & " = You're an Adult!", 0, $GUI)
                Else
                    MsgBox(64, "MsgBox()", $Read & " = You're the oldest person in the World!", 0, $GUI)
                EndIf


        EndSwitch
    WEnd
EndFunc   ;==>_Main

Not this isn't how I would normally do it (a little clunky) but I wanted to keep it simple to see if this is what you wanted?!

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

In fact nobody understand what I want

I'm not here to do the process of making a full script, but I want only create ideas and translated in the form of script

The idea will explain it more animated,

Speech synthesis

Workshop a good start I want to show the words (anythings), but when the user enters (16)

And press (OK) button, return with the number that the user was entered ....

all clear ?

Note : use Google Translator To the request of Mr.MB32

Edit : tried to attach an animation to explain, but the site rejected?

Edited by Scan
Link to comment
Share on other sites

I don't know if its Google Translate or your way of writing, but the tone of your last message seems a little aggressive & forceful for my liking. Many have tried to help with little input from yourself in terms of code.

I'm not here to do the process of making a full script.

OK, so you would rather people put the effort into creating the code and not you?

I have taken the "Speech synthesis" and this is what I did >>

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

_Main()

Func _Main()
    Local $GUI, $Input, $OK, $Cancel, $Read
    $GUI = GUICreate("@User Scan", 200, 100)
    GUICtrlCreateLabel("Enter the Number 16", 2, 5, 196)
    $Input = GUICtrlCreateInput("(Anythings)", 2, 35, 196, 20)
    $OK = GUICtrlCreateButton("&OK", 60, 70, 65)
    $Cancel = GUICtrlCreateButton("&Cancel", 130, 70, 65)
    GUISetState(@SW_SHOW)

    While 1

        Switch GUIGetMsg()
            Case -3, $Cancel
                Exit

            Case $OK
                $Read = GUICtrlRead($Input)
                If StringIsSpace($Read) Or $Read = "" Or $Read <> 16 Then ContinueLoop ; Skips if Input is empty and isn't 16.
                MsgBox(64, "MsgBox()", $Read & " = The Input was 16", 0, $GUI) ; Displays 16 in the MsgBox()

        EndSwitch
    WEnd
EndFunc   ;==>_Main

If this doesn't work I suggest the Help File.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Hi Scan,

I think I got it now:

You want an age check, that display "anything" on the first run.

If the user enters a value lower than 16 it should ask again and display the number instead of "anything".

Code:

$text = "anything"
While 1
    $hs = InputBox("title", "program", $text, "", -1, -1, 750, 520, 0, 0)
    If Number($hs) < 16 Then
        MsgBox(0, "age", "you are not adult")
        $txt = $hs
    Else
        ExitLoop
    EndIf
WEnd
;Some more code here...

Regards,

Hannes

:)

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Link to comment
Share on other sites

Which is what Melba23 did >>

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Hi guinness,

no this is slightly different, as the value is resetted on each turn.

okay I've got something a bit faulty in there ...

$text = "anything"
While 1
    $hs = InputBox("title", "program", $text, "", -1, -1, 750, 520, 0, 0)
    If Number($hs) < 16 Then
        MsgBox(0, "age", "you are not adult")
        $text = $hs
    Else
        ExitLoop
    EndIf
WEnd
;Some more code here...

Regards,

Hannes

:)

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Link to comment
Share on other sites

$text < "anything"

Only change this label to ( = )

And it's script that what i want ....

Ist's very difficult this idea?

1- show " anythis" for the first time we run it ..

2- the user replace " anythig" with No " 16 "

3- a massage show " you are not adult"

4- return to the mian "inputbox" buuuuuuuuuut .. without show " anythin"

replace it with the No that the user entered .......

it's clear now ?

thanks all brother's

Forgive me for the lack of coordination topic ...

However, with Stroni getting better over time and all this, it would be by talking to you

But do not worry me, take me because I still learn

the red line's it's Google Translate !!

i think it's so complex !!

am I write better loool ..

see u =(

Edited by Scan
Link to comment
Share on other sites

  • Moderators

Scan,

it's clear now ?

Perhaps..... :)

$sText = "Enter your age"

While 1
    $sText = InputBox("title", "program", $sText, "", -1, -1, 750, 520, 0, 0)
    If Number($sText) < 17 Then
        MsgBox(0, "age", "you are not adult")
    Else
        Exit
    EndIf
WEnd

Did we get it right this time? ;)

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

Mb32,

this is the right code ..

$text = "anything"
While 1
    $hs = InputBox("title", "program", $text, "", -1, -1, 750, 520, 0, 0)
    If Number($hs)= 16 Then ; change " > " to " = "
        MsgBox(0, "age", "you are not adult")
        $text = $hs
    Else
        ExitLoop
    EndIf
WEnd
;Some more code here...

try to run it and see how's working =)

edit : mb32 your code , when i press ( Cancel ) it's return again ! i wanna to go out if cancel pressed =(

the right code it's inside the insert code sinppert

have a nice day Mb32,

:)

Edited by Scan
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...