Xav Posted August 11, 2009 Share Posted August 11, 2009 (edited) Hi dodes, How can it "COPY" or "paste" : $Write = IniWrite ( $SettingsFile, 'Friends', 'Sms', '"^v"' ) somethin like that send("^v")... $Read = IniRead ( $SettingsFile, 'Friends', 'Sms', "ERROR" ) can "iniread" read only a part of sentence . ex .: CanThatWorkPlease. "That will read only 'WORK'" Thanks for any helps. i did'nt write autoit's ben a while =O! Edited August 11, 2009 by Xav Link to comment Share on other sites More sharing options...
Bert Posted August 12, 2009 Share Posted August 12, 2009 In trying to decipher your gibberish, I think you wish to use use iniwrite(filepath,section, key, Clipget()) The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Malkey Posted August 12, 2009 Share Posted August 12, 2009 Hi dodes, How can it "COPY" or "paste" : $Write = IniWrite ( $SettingsFile, 'Friends', 'Sms', '"^v"' ) somethin like that send("^v")... $Read = IniRead ( $SettingsFile, 'Friends', 'Sms', "ERROR" ) can "iniread" read only a part of sentence . ex .: CanThatWorkPlease. "That will read only 'WORK'" Thanks for any helps. i did'nt write autoit's ben a while =O! This link is one method of copying highlighted text, which can be used in conjunction with this script. #714806 ; Local $sRead, $Copied = "CanThatWorkPlease" ClipPut($Copied) IniWrite(@ScriptDir & "\myfile.ini", 'Friends', 'Sms', ClipGet()) $sRead = IniRead(@ScriptDir & "\myfile.ini", 'Friends', 'Sms', "ERROR") ; Use any of the String...() functions to manipulate the contents of the variable, $sRead. If StringInStr($sRead, "work", 2) <> 0 Then $sRead = "WORK" MsgBox(0, "Result", $sRead) ; Link to comment Share on other sites More sharing options...
Xav Posted August 12, 2009 Author Share Posted August 12, 2009 Thanks guys.!just a litle last thing ...Right after it read "work" do it can just endfunc; Func sms() Local $sRead, $Copied = "CanThatWorkPlease" ClipPut($Copied) IniWrite(@ScriptDir & "\myfile.ini", 'Friends', 'Sms', ClipGet()) $sRead = IniRead(@ScriptDir & "\myfile.ini", 'Friends', 'Sms', "ERROR") ; Use any of the String...() functions to manipulate the contents of the variable, $sRead. If StringInStr($sRead, "work", 2) <> 0 Then $sRead = "WORK" -- Right there , if "WORK" is wrote , it will end funcs... Elseif Does'nt work? -- MsgBox(0, "Result", $sRead) endfunc ; Link to comment Share on other sites More sharing options...
Malkey Posted August 12, 2009 Share Posted August 12, 2009 Thanks guys.! just a litle last thing ... Right after it read "work" do it can just endfunc ; Func sms() Local $sRead, $Copied = "CanThatWorkPlease" ClipPut($Copied) IniWrite(@ScriptDir & "\myfile.ini", 'Friends', 'Sms', ClipGet()) $sRead = IniRead(@ScriptDir & "\myfile.ini", 'Friends', 'Sms', "ERROR") ; Use any of the String...() functions to manipulate the contents of the variable, $sRead. If StringInStr($sRead, "work", 2) <> 0 Then $sRead = "WORK" -- Right there , if "WORK" is wrote , it will end funcs... Elseif Does'nt work? -- MsgBox(0, "Result", $sRead) endfunc ; May I suggest you play with, experiment with the examples in the help file under:- If...ElseIf...Else...EndIf ; and, Func...Return...EndFunc. Try to work out what is happening in the examples and why. The help file is a better friend than I am, Gunga Din - mon ami. Link to comment Share on other sites More sharing options...
Xav Posted August 12, 2009 Author Share Posted August 12, 2009 (edited) Something like this , does not work Func Work() Local $sRead, $Copied = "CanThatWorkPlease" ClipPut($Copied) IniWrite(@ScriptDir & "\myfile.ini", 'Friends', 'Sms', ClipGet()) $sRead = IniRead(@ScriptDir & "\myfile.ini", 'Friends', 'Sms', "ERROR") ; Use any of the String...() functions to manipulate the contents of the variable, $sRead. If StringInStr($sRead, "work", 2) <> 0 Then endfunc ElseIf StringInStr($sRead, "work", 2) <> 0 Then Thanks () endfunc Func Thanks() Send("{ENTER}") endfunc Edited August 12, 2009 by Xav Link to comment Share on other sites More sharing options...
Xav Posted August 13, 2009 Author Share Posted August 13, 2009 (edited) Help some1 =) Edited August 13, 2009 by Xav Link to comment Share on other sites More sharing options...
Malkey Posted August 13, 2009 Share Posted August 13, 2009 Try this. ; MsgBox(0, "Result", Work()) ; Calls Work() function and displays the function's return value in message box. Func Work() Local $sRead, $Copied = "CanThatWorkPlease" ; "CanThatPlease" ; ClipPut($Copied) ; Puts contents of variable $Copied onto clipboard. IniWrite(@ScriptDir & "\myfile.ini", 'Friends', 'Sms', ClipGet()); Gets contents of clipboard and writes to myfile.ini file. $sRead = IniRead(@ScriptDir & "\myfile.ini", 'Friends', 'Sms', "ERROR"); Reads Friends section of myfile.ini file & returns value of Sms. ; Use any of the String...() functions to manipulate the contents of the variable, $sRead. If StringInStr($sRead, "work", 2) <> 0 Then Return "WORK" ; This statement or just "Return" will end this function if the sub-string "work" is in the string contained in the variable $sRead. ;ElseIf StringInStr($sRead, "WhatThe", 2) <> 0 Then ; If the condition of the above "If" is True, then this line is NOT execute. ; Return "Missed it completely" ;Else ; Return "Not Work" ; If the conditions of the above "If" and "ElseIf" are false, then this line is executed. EndIf ; This is required to complete the "If...ElseIf...Else...EndIf" statement. Return Thanks() EndFunc ;==>Work Func Thanks() Return "{ENTER}" EndFunc ;==>Thanks ; Link to comment Share on other sites More sharing options...
Xav Posted August 14, 2009 Author Share Posted August 14, 2009 Thanks !!!! 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