faustf

somthing strange o_O @script macro and co.

10 posts in this topic

#1 ·  Posted (edited)

hi guys

i have  a big  program inside of them i have a routine ,  this is a part of it

Case $utenteFAKEorNOT <> IniRead($sDefault_eBay_login, "log_eBay_default_user", "key1", "default value") ; nel caso ho selezionato il fake user e devo ricreargli il token oppure gia cE L'ha
        MsgBox(0,'4589',$utenteFAKEorNOT)
            Local $pLFakePath = @ScriptDir & "\WEB-SITE\eBay\utenti\" & $utenteFAKEorNOT & "\utente_ebay.ini"
            MsgBox(0,'4589',$pLFakePath)
            If FileExists($pLFakePath) = 1 Then
                Local $dData_start_token = IniRead($pLFakePath, "log_eBay_Fake_user", "Key3", "Default Value") ; data start token

so , with first messagebox i controll a variable name , and is correct  , then , when arrive at 

Local $pLFakePath = @ScriptDir & "\WEB-SITE\eBay\utenti\" & $utenteFAKEorNOT & "\utente_ebay.ini"

the second messagebox  work perfect  and  give me  a correct  path , (ofcourse in the path exist the file utente_ebay.ini)

but when arrive at  If FileExists($pLFakePath) = 1 Then    , give me  not exist a file

i tryed to change @script  with path like this

Local $pLFakePath =(  "C:\Users\utente\Desktop\_GESTIONALE_NEW\WEB-SITE\eBay\utenti\" & $utenteFAKEorNOT & "\utente_ebay.ini")

and work perfect

someone   can help me ?? thankzz :)

 

Edited by faustf

Share this post


Link to post
Share on other sites



#2 ·  Posted

8 minutes ago, faustf said:

Local $pLFakePath =( @ScriptDir & "C:\Users\utente\Desktop\_GESTIONALE_NEW\WEB-SITE\eBay\utenti\" & $utenteFAKEorNOT & "\utente_ebay.ini")

Wouldn't that return C:\Users\utente\Desktop\_GESTIONALE_NEWC:\Users\utente\Desktop\_GESTIONALE_NEW\WEB-SITE\eBay\utenti... or was the @ScriptDir a typo?

If you use ConsoleWrite(@ScriptDir & "\WEB-SITE\eBay\utenti\" & $utenteFAKEorNOT & "\utente_ebay.ini" & @CRLF) in place of MsgBox(0,'4589',$pLFakePath) can you post the output?

Share this post


Link to post
Share on other sites

#3 ·  Posted

@script dir return    C:\Users\utente\Desktop

i add  this \WEB-SITE\eBay\utenti\

inside the variable i have  a correct user      mascetti_luigi

and  utente_ebay.ini    is file ( check if exist )

with console write  i have   this

C:\Users\utente\Desktop\_GESTIONALE_NEW \mascetti_luigi\utente_ebay.ini 

indeed if i copy and past inside a explore folder i open a file

 

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Little confused is your script on the C:\Users\utente\Desktop or C:\Users\utente\Desktop\_GESTIONALE_NEW?

Edited by Subz

Share this post


Link to post
Share on other sites

#5 ·  Posted

sorry for confusion i just do somthing test  now  the last configuration of folder is  this C:\_GESTIONALE_NEW , and remaning this  till the end of project

i have in root  C:\   the folder name _GESTIONALE_NEW , inside them i  have  GEST_NEW.AU3  and it call @scriptdir  (ofcourse inside of _GESTIONALE_NEW , i have \WEB-SITE\eBay\utenti\ )

@scripdir                            &       "\WEB-SITE\eBay\utenti\"                &   $utenteFAKEorNOT   &       "\utente_ebay.ini"

C:\_GESTIONALE_NEW                      \WEB-SITE\eBay\utenti\              mascetti_luigi                 \utente_ebay.ini

and  also in this mode  with relative path work perfect  with @scriptdir not  work

o_O

 

 

 

Share this post


Link to post
Share on other sites

#6 ·  Posted

now also with relative path 

C:\_GESTIONALE_NEW\WEB-SITE\eBay\utenti\mascetti_luigi\utente_ebay.ini

tell me  the file not exist  but  if i copy and past inside of explorer  i open a ini file  o_O

 

 

 

 

Share this post


Link to post
Share on other sites

#7 ·  Posted

For testing I have created the exact same folder structure and added the script and ini files as you specified above.  In my script I used the following:

Local $utenteFAKEorNOT = 'mascetti_luigi'
ConsoleWrite('$utenteFAKEorNOT = ' & $utenteFAKEorNOT & @CRLF)
Local $pLFakePath = @ScriptDir & "\WEB-SITE\eBay\utenti\" & $utenteFAKEorNOT & "\utente_ebay.ini"
ConsoleWrite('$pLFakePath = ' & $pLFakePath & @CRLF)
ConsoleWrite('FileExists = ' & FileExists($pLFakePath) & @CRLF)

Which the console returned

$utenteFAKEorNOT = mascetti_luigi
$pLFakePath = C:\_GESTIONALE_NEW\WEB-SITE\eBay\utenti\mascetti_luigi\utente_ebay.ini
FileExists = 1

Can you create a new script in _GESTIONALE_NEW with the code above and let me know the results?

1 person likes this

Share this post


Link to post
Share on other sites

#8 ·  Posted

o thnkzzzzzz so muchhhh i  find  a  problem  :D

ti voglio bene  :)

 

Share this post


Link to post
Share on other sites

#9 ·  Posted

Glad to help, what was the issue?

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

simply  like  usally  , when is late and  concentrate your  focus  over a part of  script and dont look other part down :)

 

 

Edited by faustf

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