Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Auto it or autohotkey icon question  (Read 4160 times)

0 Members and 1 Guest are viewing this topic.

zask

    Topic Starter


    Intermediate

    • Experience: Experienced
    • OS: Other
    Auto it or autohotkey icon question
    « on: January 15, 2017, 08:28:14 PM »
    Is it possible to use autohotkey to search in a text file with a specific name for a file path on the first line, take that file path, place it in a variable inside the autohotkey script, then use that variable to find the file, after the file is found, take the icon of that file, extract its image, then search for the second line in the text file for another file path, after that path is found put it in another variable in the autohotkey script, then replace the second file's icon with the first files icon. I want to to this because I'm trying to create a program that can borrow icons from other exe files, but I'll have to embed the autohotkey script into an exe file that has other files embedded with it, and the autohotkey script requires the information (file name, extension and folder location) from a different file inside the exe, so I need to use a temporary text file to pass on this information. I know a little autohotkey, but my knowledge on the language isnt much and cannot find anywhere on how to do this. Thanks. I would normally ask for it to request the name of the file within the autohotkey script and not the text file, but if I do that I can't combine this option to my program because they are two completely different languages.
    « Last Edit: January 15, 2017, 08:46:49 PM by zask »

    DaveLembke



      Sage
    • Thanked: 662
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Auto it or autohotkey icon question
    « Reply #1 on: January 15, 2017, 09:32:57 PM »
    Quote
    I want to to this because I'm trying to create a program that can borrow icons from other exe files, but I'll have to embed the autohotkey script into an exe file that has other files embedded with it, and the autohotkey script requires the information (file name, extension and folder location) from a different file inside the exe, so I need to use a temporary text file to pass on this information.

    This could be used very badly to make/mask an EXE to look like its a totally different program by using someone elses / some other programs icon image to trick someone into running an exe that is not the actual exe originally associated with the icon image.

    Sorry I cant help with this because the way that this can be used wrongly is too dangerous to share. I cant see a non malicious use of using some other programs icon image for your own exe.  ::)

    I can see a one time use of wanting to use some cool icon and associate it with your EXE, but your talking about dynamic icon image manipulation of already existing EXEs which looks like it has malicious intent. Maybe its just to play a trick on a friend etc, but I cant help with something this dangerous to assist in creating a dynamic tool of masking one exe with anothers icon on the fly.  ;)



    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Auto it or autohotkey icon question
    « Reply #2 on: January 15, 2017, 09:33:53 PM »
    from CH archives:
    AutoHotkey is a fantastic free and open source Microsoft Windows tool that allows you to create macros, scripts, and automate frequently performed tasks on your computer. For example, Computer Hope uses this tool daily to help answer common questions asked in e-mail quickly and perform other common repetitive tasks. Below are just a few examples of what AutoHotkey is capable of doing.
    http://www.computerhope.com/jargon/a/autohotkey.htm

    A script for auto hotkey can be very involved, if you want.
    Look here for some ideas:
    https://www.autohotkey.com/docs/scripts/

    Your post looks like one paragraph but with several ideas. If you make it into a structure that makes  clear the different parts, it would be easier for others to follow your logic. Maybe you could make it in a  numbered list.  :)