Jump to content

somthing strange o_O @script macro and co.


 Share

Recommended Posts

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

@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

 

 

Link to comment
Share on other sites

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

 

 

 

Link to comment
Share on other sites

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?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...