broliukaz Posted November 5, 2014 Share Posted November 5, 2014 Hello, is there a way to replace button caption from "Cancel" to "Replace" in the inputbox? Local $filename = "Address.txt" Local $savedir = @ScriptDir&"\"&$filename While FileExists($savedir) Local $NewFilename = InputBox($savedir, 'The File: "'& $filename &'" already exists, please enter new filename or press cancel to overwrite: ', $filename) If @Error = 1 Then ExitLoop Else $filename = $NewFilename $savedir = @ScriptDir&"\"&$filename EndIf WEnd Any ideas are appreciated Link to comment Share on other sites More sharing options...
MikahS Posted November 5, 2014 Share Posted November 5, 2014 Why not just make your own? #include <GUIConstants.au3> Global $hWnd, $msg, $input, $bOkay, $bReplace $hWnd = GUICreate("InputBox", 200, 140) ; create the window $input = GUICtrlCreateInput("", 15, 25, 160) ; create the input $bOkay = GUICtrlCreateButton("Okay", 15, 80) ; create the okay button $bReplace = GUICtrlCreateButton("Replace", 125, 80) ; create the replace button GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $bOkay ; tell us what we entered MsgBox(0, "", GUICtrlRead($input)) Case $bReplace ; this is just a sample it does not have to do with how you want to actually ; use the replace button GUICtrlSetData($input, "") EndSwitch WEnd Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Solution funkey Posted November 5, 2014 Solution Share Posted November 5, 2014 MikahS 1 Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
broliukaz Posted November 6, 2014 Author Share Posted November 6, 2014 Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now