[AU3]Problem

10/26/2010 11:54 Akatana#1
Hey habe eine Frage aber erstmal hier der Source:
PHP Code:
#include <File.au3>
#include <File.au3>
#include <String.au3>

$file "data.txt"
$path ""

$pa InputBox ("Path""Add ur path below:")
$id InputBox ("Data""Place ur ID")
$pw InputBox ("Data""Place ur Password""""*")

$crypt_id _StringEncrypt (1$id"Akatana")
$crypt_pw _StringEncrypt (1$pw"Akatana")

FileWrite ($file"")
_FileWriteToLine ($file1$crypt_id1)
_FileWriteToLine ($file2$crypt_pw1)

$id2 FileReadLine ($file1)
$pw2 FileReadLine ($file2)

$crypt_id2 _StringEncrypt (0$id2"Akatana")
$crypt_pw2 _StringEncrypt (0$pw2"Akatana")

If 
$path True Then
    
Switch $path
    
Case True
    $pa To $path
    
Case False
    
EndSwitch
EndIf


If 
$pw = ("test"Then 
    MsgBox
(0"Password""Your Password is correct!")
    
Run("C:\WINDOWS\EXPLORER.EXE /n,/e," $path)
    Exit
Else
    
MsgBox(0"Password""Your Password is incorrect!")
EndIf 
So nun zur Frage:
Ich würde gerne $path mit dem vom user ausgewählten $pa austauschen leider funktioniert das mit dem Switch Command irgendwie nicht wie man oben sieht...
Hätte da jemand ne Lösung? :)

lg
Akatana
10/26/2010 11:57 sava#2
Moin,

wiesow machst du das nicht einfach, wenns so nicht funktioniert, nicht mit einer Hilfsvariable :)

Quote:
$hilfe = $path
$path = $pa
$pa = $hilfe
Das wäre ja ein einfaches Austauschen und wenn du das noch mehr brauchst, einfach ne Function :D

Mfg
10/26/2010 12:08 Akatana#3
Ja danke funktioniert perfekt :P