Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

InputBox problem

$
0
0
I am trying to input some text into an InputBox.  Even though I type something into the InputBox nothing is ending up in the field.

[ autoit ]      
Dim $sequence = 00 ; $Folder="C:\Program Files\PMAIL\MAIL\Docfxit\" ; Live $Folder = "C:\Scratch\Scratch11\" ; Test ;$File = InputBox("Find and replace", "Name and/or path of the file", "Hierarch.pm", "", 500, 100) ;MsgBox(48, "Path\File", $Folder & $File) $File = "Hierarch.pm" $FileContent = FileRead($Folder & $File, FileGetSize($File)) $Find = InputBox("Find and replace", "What to find?", "FindThisText", "", 500, 100) $Replace = InputBox("Find and replace", "What to write instead?", "ReplaceWithThisText", "", 500, 100) $Confirm = MsgBox(65, "Find and replace", "You are about to change every instance of " & $Find & " by " & $Replace & " in the file " & $File & @LF & "Are you sure? ") ; $Replace shows here MSGBox(4096,"","Replace -", $Replace & "-") ; $Replace doesn't show here If $Confirm = 1 Then $sequence = StringFormat("%02d", $sequence + 1) FileCopy($Folder & $File, $Folder & $File & "." & $sequence & ".bak") $FileContent = StringReplace($FileContent, $Find, $Replace) FileDelete($File) FileWrite($File, $FileContent) EndIf

I'm testing with this file named "Hierarch.pm"
This is what is in the "Hierarch.pm" file:
0,0,"1E9E52F0:1E8A:FOL05BB5","72496884:My mailbox","AS/400 Setup"


The Text I'm inputting into the "FindThisText" is "FOL05BB5" without the quotes.
The Text I'm inputting into the "ReplaceWithThisText" is "AS400Sep" without the quotes.
The $Replace is showing in the $Confirm = MsgBox line but it's not showing in the next MsgBox line.

I can't figure out why.

Thanks,

Docfxit

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>