Sign in to follow this  
Followers 0
Dethredic

Navigating through a weird file

16 posts in this topic

Hi

It would defiantly help you to help me if you have firefox.

I need to edit a file inside: C:/Documents and Settings/[uSER]/Application Data/Mozilla/Firefox/Profiles/bvf62xd1.default/myfilehere

First problem.

"C:/Documents and Settings" & @UserName & "Application Data/Mozilla/Firefox/Profiles/bvf62xd1.default/prefs.js" does not work. Is there any other way i can navigate through that file/folder and edit prefs.js?

Second problem.

bvf62xd1 is unique to my computer only (or so i am told). It is supposed to have the same number of letters/numbers and extension all the time though. If i can navigate through it, can i set a variable or something so this script will work on other computers?

Thanks


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

"C:\Documents and Settings\"&@USERNAME&"\Whatev\Ect...\"

EDIT: I'm not sure about the second question

Edited by D-Generation X

Share this post


Link to post
Share on other sites

Second problem.

bvf62xd1 is unique to my computer only (or so i am told). It is supposed to have the same number of letters/numbers and extension all the time though. If i can navigate through it, can i set a variable or something so this script will work on other computers?

Do the innocent a favor, don't go messing in areas you don't understand thoroughly.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

"C:\Documents and Settings\"&@USERNAME&"\Whatev\Ect...\"

How does this help me?

Do the innocent a favor, don't go messing in areas you don't understand thoroughly.

Then how do you learn new things?

"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

How does this help me?

Then how do you learn new things?

I would suggest starting with Mozilla and maybe better educate yourself, anything we say here is just hearsay, and I sure as hell don't want someone giving me something they made purely on hearsay. No better facts than straight from the horses mouth.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Got your back-slash / forward-slash \ things the wrong way around?

Share this post


Link to post
Share on other sites

How does this help me?

It shows you the correct way to build a path to a file! Compare it to your attempt

and you will see the difference.


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Ha thanks guys didn't even know the slashes were going the wrong way

OK first problem fixed.

After "Educating" myself i have confirmed my first information. Any ideas on he second problem?

Edited by Dethredic

"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

Got your back-slash / forward-slash \ things the wrong way around?

That's not the problem. Windows accepts / and \ in a path. The problems is, that he left two slashes!

WRONG:

"C:\Documents and Settings"&@USERNAME&"Whatev\Ect...\" as this would become "C:\Documents and SettingsjoeWhatev\Ect...\"

CORRECT:

"C:\Documents and Settings\"&@USERNAME&"\Whatev\Ect...\" as this would become "C:\Documents and Settings\joe\Whatev\Ect...\"


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

After "Educating" myself i have confirmed my first information. Any ideas on he second problem?

Here is some more stuff to "educate" ... http://www.mozilla.org/support/firefox/profile


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

That's not the problem. Windows accepts / and \ in a path. The problems is, that he left two slashes!

Thanks, got that already

Here is some more stuff to "educate" ... http://www.mozilla.org/support/firefox/profile

I read that already (how i found out where the user.js file is as well as my other information)

I need some way of figuring out how to find the characters that replace xxxxxxxx in xxxxxxxx.default


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

I need some way of figuring out how to find the characters that replace xxxxxxxx in xxxxxxxx.default

well.... _FileListToArray() in the Firefox Profile directory and then walk through the array and build the path to prefs.js for every profile, or just the default profile if you prefer that!

PS: I'm pretty sure I know your next question ....


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

PS: I'm pretty sure I know your next question ....

Lets hear your guess?

"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Ok, couldn't figure out to get anywhere with _FileListToArray() :whistle:

Using the helpfile example with a slight modification

#Include <File.au3>
#Include <Array.au3>
$FileList=_FileListToArray("C:\Documents and Settings\" & @UserName & "\Application Data\Mozilla\Firefox\Profiles\")
If @Error=1 Then
    MsgBox (0,"","No Files\Folders Found.")
    Exit
EndIf
_ArrayDisplay($FileList,"$FileList")

this lists the file name, but i don't know how to set it as a variable

Edited by Dethredic

"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

figured it out

$FileList =_FileListToArray("C:\Documents and Settings\" & @UserName & "\Application Data\Mozilla\Firefox\Profiles\")

If @Error=1 Then

MsgBox (0,"","Firefox can not be optimized due to a bad location of files")

Exit

EndIf

$prefs = "C:\Documents and Settings\" & @UserName & "\Application Data\Mozilla\Firefox\Profiles\" & $filelist[1] & "\prefs.js"

Edited by Dethredic

"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

Ok, couldn't figure out to get anywhere with _FileListToArray() :whistle:

That was my guess!


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

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
Sign in to follow this  
Followers 0