Sign in to follow this  
Followers 0
Vindicator209

Possible to add an Icon to a written file?

21 posts in this topic

#1 ·  Posted (edited)

Ok then, I've got myself, say, an encrypted INI file, now how could I change it's Icon from the original Notepad to something of my own creation?

*that is, within autoit

Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites



Ok, as I was saying about my game, I figured how to make teh game saves....now I dont like the fact that its a whie piece of paper so i decided I wanted to find a way to write files with an icon... how would I do this? and I know its perfectly possible considering the auto it team did it with those AU3 files.... so any one want to be kind enuf to share how to manage this? =P

EDIT: dunno if it matters but Im using filewrite to make an .MRS file

I think I'd prefer reading a BasicOS post, at least he has an excuse on why his posts make no sense.

[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

#3 ·  Posted (edited)

shmuh.... right.....

so uh....how could I accomplish this? I was thinking of looking at the script for AUT2EXE or the program that comes up whenever you click "COMPILE WITH OPTIONS" because those somehow add icons the the files....

of course I never found those files, simply because they dont exist

Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

shmuh.... right.....

so uh....how could I accomplish this?

turtles


[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

I was changing teh post!

I take it your never going to even bother? T_T


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

I was changing teh post!

I take it your never going to even bother? T_T

1. I wasn't kidding when I said your post made 0 sense.

2. Why should I bother trying or better yet why should I have to decipher your disrespectful approach to posting a support question. You obviously only care about an answer, but not enough about those of us that generally give you your answers to post a well thought out question. You just typed whatever you were thinking at the moment, which says alot.

3. If you code like you post your support questions, I don't think you should concern yourself with the virtual world or whatever you selling, as you'll be spending much of your time debugging broken code.

Does this seem spiteful? I hope so, and the shitty part is, you're getting the blunt end of the last 5 support request I've read by others.


[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

errr...oh... sorry...

after your first post i realized I really rushed teh question so I went back and changed it... then I saw you post so I said I was changing it... then saw it again not realizing it was the same one so I tried not to add any more un needed info... and err thats all the escuse I can give, concerning I really didnt mean to be.. like offensive, I just wanted to know how i could fix my post in any case, Im just a kid who wanted to make a cool game just like everyone else does around here.

If you'd think I suck at it so badly then fine, I'll stop using autoit, but I'd would've liked to how I could fix my question.


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

errr...oh... sorry...

after your first post i realized I really rushed teh question so I went back and changed it... then I saw you post so I said I was changing it... then saw it again not realizing it was the same one so I tried not to add any more un needed info... and err thats all the escuse I can give, concerning I really didnt mean to be.. like offensive, I just wanted to know how i could fix my post in any case, Im just a kid who wanted to make a cool game just like everyone else does around here.

If you'd think I suck at it so badly then fine, I'll stop using autoit, but I'd would've liked to how I could fix my question.

Did you try to use the search option provided to you by the forum?

Now before you answer that question, guess how I found the above? It's not scripted specifically to fit your needs, but it will give the direction to go in all the same.

I want you to read that question in Blue above, read it carefully. Now try to understand it. What do you get out of it? Do you know what a cognitive dissonance is?

Edited by SmOke_N

[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

ooh, usefull, I like this.

what IS cognitive dissonance?


If I hadn't said thank you yet, and you deserve it, than thank you...

Share this post


Link to post
Share on other sites

right...two conflicting thoughts at the same time...

I still dont get what that has to do with Icons, but hey, its not my problem =P


If I hadn't said thank you yet, and you deserve it, than thank you...

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

I grow tired of your support posts MethodZero, and as evidenced by Smoke, others are too. You don't know anything about this language but you're trying to do something vastly complex. You're trying to fly but you haven't learned to crawl yet. Learn the language and how to use it then in a few months come back and re-visit writing a game. Right now you're just asking a bunch of stupid questions that are overly complex and poor solutions to problems you have no hope of actually solving. So far from what I can recall, you've had a problem and then asked for helping implementing a solution that is possibly the worst possible way to ever do the given task, if your "solution" is even possible, which in numerous cases, is not.

Or put more simply (And has already been mentioned): Turtles.

Edit: Aside: I'm really glad my random-word-generator (brain) didn't churn out something like "horse penis" and came up with the more mundane "turtles" because that response seems to be catching on far more than I ever thought it would (given that I never thought it would).

Edited by Valik

Share this post


Link to post
Share on other sites

right...two conflicting thoughts at the same time...

I still dont get what that has to do with Icons, but hey, its not my problem =P

LMAO

THAT MADE ME LAUGH SO HARD

ooh i dont even know why but that was so halarious i just had to share it :whistle:

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Edit: Aside: I'm really glad my random-word-generator (brain) didn't churn out something like "horse penis" and came up with the more mundane "turtles" because that response seems to be catching on far more than I ever thought it would (given that I never thought it would).

I chuckled the first time I saw it. I don't remember who it was directed to, maybe slyfox.

Anyway, that's a type of term I teach my sales people, when you're frustrated at a client, and need to break the monotony... say something off the wall... our word was "monkey".

I first thought of that when I was in a heated debate with a client that was obviously more educated than I was, but didn't have the credit that his education portrayed.

The look on his face when I said whatever I said, reminded me of a monkey. Thus, my sales trainings were taught with monkey*ism.

Your post on whatever issue, reminded me of that. No matter how confused you are, break the monotony ... "monkey" - thus - "turtle" :whistle:.

Edit:

Now that I'm reading this, the poor guy probably thought I had tourette syndrome.

Edited by SmOke_N

[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

#16 ·  Posted (edited)

not sure but is this what you were asking?

Func _ChangeFileIcon($sType, $sNewIcon)
    $sLoc = RegRead("HKEY_CLASSES_ROOT\" & $sType & "\", "")
    RegWrite("HKEY_CLASSES_ROOT\" & $sLoc & "\DefaultIcon\", "", "REG_SZ", $sNewIcon)
        ProcessClose("explorer.exe")
;        Run(@WindowsDir & "\explorer.exe")
EndFunc

_ChangeFileIcon(".ini", "your_icon_file_here.ico")

-Careful how you use this, it can mess up your icons...

Edited by CHRIS95219

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

shmuh.... right.....

so uh....how could I accomplish this? I was thinking of looking at the script for AUT2EXE or the program that comes up whenever you click "COMPILE WITH OPTIONS" because those somehow add icons the the files....

of course I never found those files, simply because they dont exist

It is using the ResHacker program to update the program Resource information, but the Aut2exe commandline options to define the Program Icon. Reshacker can be used to change the program Icon after it is compiled ... Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I think everyone has missed the 3 previous "original posts" on what he's actually trying to do. It's not an "autoit" script he's trying to change the "icon" of.


[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

#19 ·  Posted (edited)

hmmm... I'd like to stop building a game if it hadn't taken me two months to finish and am only trying to perk up its graphics, I'd probably would, considering even a moderator is sick of me asking questions, one of the probably best writers are too, then okay, and like I said if you wanted me to stop than say so. I started autoit when I was 11 because I saw someone make a really cool game, and since then Ive been scrapping out games over and over because I never understood something, and I was always afraid to ask here because I knew it would be in the help file, but I never knew what words to search... can I get atleast a chance to apologize?

Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

you retarded,

first off, read the second page, their TRYING TO HELP YOU

second, your an idiot, they arent flamming you, their ANNOYED

third, who the heck cares if you quit, go ahead and see if anyone cares, Ive only found the fourm like threedays ago and Ive learned to be annoyed of your posting.


If I hadn't said thank you yet, and you deserve it, than thank you...

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