Sign in to follow this  
Followers 0
daywalkereg

about the language translator

6 posts in this topic

i want to tell the program "if" string found replace it with another something like

IF string =" " found Then

stringreplace(" ")

Endif

please help


1 £0\\/3 |-|3® $0 |\\/|µ(|-|

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

thanx lord but i have another 2 problems

1- that i cant copy or move the so called translated filename to given dir because the program give only file name

2- how can i get full path of the files in FileFindFirstFile function

any ideas :):P

Edited by daywalkereg

1 £0\\/3 |-|3® $0 |\\/|µ(|-|

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

you can append the full path to the file like you append strings to another string..

first you have to check if the path to the file contains spaces.

$string="test"
$path="c:\test 123"
If StringInStr($string, "es") Then
    $string = StringReplace($string, "es", "oe")
EndIf
ConsoleWrite('@@ Debug(' & _
             ') : $string = ' & _
            $string & @crlf & _
            '>Error code: ' & @error)
            
if StringInStr($path, " ") Then
    $path = '"' & $path & '"'
EndIf
run(@ComSpec & " /C echo " & $path & " & pause")

you could also use the @ScriptFullPath macro

Edited by lordofthestrings

Share this post


Link to post
Share on other sites

ok i made it any idias how to save it with the new name


1 £0\\/3 |-|3® $0 |\\/|µ(|-|

Share this post


Link to post
Share on other sites

that would be a matter of simple logic:

this piece should demonstrate how I would do it..

$newpath = @ScriptDir & '\test.txt'
$Handle = FileOpen($newpath, 1)
FileWriteLine($Handle, "I just created this new file under the newpath")
FileClose($Handle)

Share this post


Link to post
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
Sign in to follow this  
Followers 0