The map publisher handle is obviously constant, the player handle can be retrieved with the "Handle of Player" trigger, however there is no way to get the account number of the player with the editor afaiaa.
Hi, thanks for your response. I'm trying to connect a website (I know HTML and Javascript) with a bank file.
In my website, I have a text field where the user can type in the directory of the bank. I want to tell the user the directory of the bank file in the Starcraft II game so that he knows what to type in the text field. My website will then use the directory, get the bank, and access it like an XML file.
Unfortunately, as you have said, it is impossible to get the real directory of the bank. Do you have any suggestions?
As it was explained over at stack overflow you can not access a users files on their computer using javascript.
You could potentially create a small Java App that the user could download and run which finds the file for the user and displays the path to them so they can manually upload it to your website.
This is the only way i can think of, in your app you would also need to determine their operating system and username.
you also must remember that some paths are not the same for Windows 7, Windows XP, and OSX
Windows 7: C:\Users\(your user name)\Documents\Starcraft II\Banks\
Windows XP: C:\Documents and Settings\(your user name)\My Documents\StarCraft II\
OSX: /Users/(your user name)/Library/Application Support/Blizzard/StarCraft II/
So after you determined the operating system and collected the path you would then need the user to manually upload the file.
With the Java application NOT a java applet you could easily search through there file system and locate the bank.
However i feel like many people would be suspicious of such programs you would need to make it very transparent.
Also if you make the Java Application well you can even add functionality for it to push the file found directly to your server assuming that your server allows this functionality.
How do I get (in a string) the file location (file directory) where a bank is stored?
@Chris97Ong: Go
The format for the directory is
Documents\StarCraft II\Accounts\<Account number>\<Player handle>\Banks\<Map publisher handle>\
The map publisher handle is obviously constant, the player handle can be retrieved with the "Handle of Player" trigger, however there is no way to get the account number of the player with the editor afaiaa.
@DeltaV: Go
Hi, thanks for your response. I'm trying to connect a website (I know HTML and Javascript) with a bank file.
In my website, I have a text field where the user can type in the directory of the bank. I want to tell the user the directory of the bank file in the Starcraft II game so that he knows what to type in the text field. My website will then use the directory, get the bank, and access it like an XML file.
Unfortunately, as you have said, it is impossible to get the real directory of the bank. Do you have any suggestions?
@Chris97Ong: Go
if you know the name of the bank file you could still search the file directory?
@FunkyUserName: Go
Sorry, could you elaborate? I don't understand what you are saying.
@Chris97Ong: Go
couln't you write a javascript function to search the MyBankFile in Documents\StarCraft II\Accounts\ and return the path?
@FunkyUserName: Go
Then how do I write the function? I'm not really good at Javascript. I've searched the net and still can't find any method.
By the way, I've asked this on stackoverflow here but no answer.
As it was explained over at stack overflow you can not access a users files on their computer using javascript.
You could potentially create a small Java App that the user could download and run which finds the file for the user and displays the path to them so they can manually upload it to your website.
This is the only way i can think of, in your app you would also need to determine their operating system and username.
you also must remember that some paths are not the same for Windows 7, Windows XP, and OSX
Windows 7: C:\Users\(your user name)\Documents\Starcraft II\Banks\
Windows XP: C:\Documents and Settings\(your user name)\My Documents\StarCraft II\
OSX: /Users/(your user name)/Library/Application Support/Blizzard/StarCraft II/
So after you determined the operating system and collected the path you would then need the user to manually upload the file.
With the Java application NOT a java applet you could easily search through there file system and locate the bank.
However i feel like many people would be suspicious of such programs you would need to make it very transparent.
Also if you make the Java Application well you can even add functionality for it to push the file found directly to your server assuming that your server allows this functionality.