Hi
to start with, yes, i’ve read “Variable Scope in Applescript and Applescript Studio”, but still, my variable aren’t global.
Here’s how I defined them:
on clicked theObject
(*Add your script here.*)
if name of theObject is "login_button" then
start progress indicator "login_indicator" of view "login_view" of window "doupload"
set visible of view "login_indicator" of view "login_view" of window "doupload" to true
[b]global firma_id, ftp_username, ftp_passwort
set firma_id to ""
set ftp_username to ""
set ftp_passwort to ""[/b]
set passwort to (get string value of text field "passwort_feld" of view "login_view" of window "doupload")
set firma_id to (get string value of text field "firma_id_feld" of view "login_view" of window "doupload")
set md5hash to (do shell script "md5 -q -s '" & passwort & "'")
set ausgabe to (do shell script ("curl http://localhost/test.php?id=" & firma_id & "\\&md5=" & md5hash))
set ausgabe to splitText(";", ausgabe)
--hier ausgaben überprüfen
set login_status to item 1 of ausgabe
[b]set ftp_username to item 2 of ausgabe[/b]
set ftp_passwort to item 3 of ausgabe
i want to use the three variables in a function “on prozessEinleiten(pathNames)” but i get the error, the variables aren’t defined.
I really don’t know why this happens, since the variables are set global, and according to the thread and the apple dev center this should work.
i already tried putting the “global …” on other parts of the script, but it didn’t work neighter.