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

StringReverse problem..

$
0
0
Hi, guys.

I got a new problem here..

Example : I want to input "abc" in textbox and reverse it into test.txt file dynamically..

I want the correct value is : "cba"

Error value : "abacba" in test.txt

[ autoit ]         
#Include <String.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 262, 72, 504, 286) $Input1 = GUICtrlCreateInput("", 48, 24, 177, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUIRegisterMsg($WM_COMMAND, "_KeyWordOnInputBoxEvent") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _KeyWordOnInputBoxEvent($hWnd, $imsg, $iwParam, $ilParam) Local $setHK = False $nNotifyCode = BitShift($iwParam, 16) $nID = BitAND($iwParam, 0x0000FFFF) $hCtrl = $ilParam $time = 0 If $nNotifyCode = $EN_CHANGE Then If $hCtrl = GUICtrlGetHandle($Input1) Then If GUICtrlRead($Input1) <> "" Then $startcheck = _StringReverse(GUICtrlRead($Input1)) $TEST = FileOpen("test.txt", 1) FileWrite("test.txt", $startcheck) FileClose($TEST) EndIf EndIf EndIf Return $GUI_RUNDEFMSG EndFunc

Best Regard

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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