Results 1 to 11 of 11
  1. #1
    Pschytex's Avatar
    Join Date
    Jul 2016
    Gender
    male
    Posts
    380
    Reputation
    10
    Thanks
    413

    Wink How do I attatch a AHK script to my .exe file?? C# project..

    How do I attatch a AHK script to my .exe file?? C# project.. ??

    As If I want to like... Make a program.. So I can press a button, and it runs my script.. but if I later on want to run a 2nd script.. I just press another button?

    As If like I had 3 scripts inside of my program? could I make hotkeys for them to run? EX like typing "ALT+SHIFT+F1"

  2. #2
    Pschytex's Avatar
    Join Date
    Jul 2016
    Gender
    male
    Posts
    380
    Reputation
    10
    Thanks
    413
    Does anyone know how to do this?

  3. #3
    Frederik Emil's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    This would be very nice to know though... I've been looking for this too

  4. #4
    _NightWare's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Location
    Netherlands
    Posts
    724
    Reputation
    274
    Thanks
    2,302
    My Mood
    Inspired
    try this;
    Code:
     
    using System.Diagnostics;
    
    string winpath = Environment.GetEnvironmentVariable("windir");
    string path = System****.Path.GetDirectoryName(
                      System.Windows.Forms.Application.ExecutablePath);
    
    Process.Start(winpath + @"\Microsoft.NET\Framework\v1.0.3705\Installutil.exe",
        path + "\\MyService.exe");
    more info on process.start() here
    Last edited by _NightWare; 08-10-2016 at 01:26 PM.

    Feel free to leave a thanks or +rep if I helped you.

    ಠ_ರೃ
    Script Squad






    [IMG]https://roblo*****m?rbxp=135887430[/IMG]

  5. #5
    Pschytex's Avatar
    Join Date
    Jul 2016
    Gender
    male
    Posts
    380
    Reputation
    10
    Thanks
    413
    Quote Originally Posted by _NightWare View Post
    try this;
    Code:
     
    using System.Diagnostics;
    
    string winpath = Environment.GetEnvironmentVariable("windir");
    string path = System****.Path.GetDirectoryName(
                      System.Windows.Forms.Application.ExecutablePath);
    
    Process.Start(winpath + @"\Microsoft.NET\Framework\v1.0.3705\Installutil.exe",
        path + "\\MyService.exe");
    more info on process.start() here
    So the
    "Process.Start(winpath + @"\Microsoft.NET\Framework\v1.0.3705\Installutil.e xe",
    path + "\\MyService.exe");" is where I put the program I guess.

  6. #6
    _NightWare's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Location
    Netherlands
    Posts
    724
    Reputation
    274
    Thanks
    2,302
    My Mood
    Inspired
    Quote Originally Posted by Pschytex View Post
    So the
    "Process.Start(winpath + @"\Microsoft.NET\Framework\v1.0.3705\Installutil.e xe",
    path + "\\MyService.exe");" is where I put the program I guess.
    Click the link I provided for the documentation on Process.start
    But yes, you just replace the path. (I suggest you put a dynamic path like in example)

    Feel free to leave a thanks or +rep if I helped you.

    ಠ_ರೃ
    Script Squad






    [IMG]https://roblo*****m?rbxp=135887430[/IMG]

  7. #7
    Pschytex's Avatar
    Join Date
    Jul 2016
    Gender
    male
    Posts
    380
    Reputation
    10
    Thanks
    413
    Quote Originally Posted by _NightWare View Post


    Click the link I provided for the documentation on Process.start
    But yes, you just replace the path. (I suggest you put a dynamic path like in example)
    Thanks. I will try it out.

  8. #8
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    Quote Originally Posted by Pschytex View Post
    Thanks. I will try it out.
    btw, you can hardcode the .ahk script inside the program, so that it builds it on runtime (and makes it hidden on the same directory as the .exe)

    This means the user only has to download a .exe and gets the scripts upon running, he doesnt see them (normally) either, so you are good.

    you can get the bytes from a file, put them in your code, and make your program build a new ahk script using the hex values from the bytes you hardcoded in the program.
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  9. #9
    Zaczero's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Location
    localhost
    Posts
    3,288
    Reputation
    1517
    Thanks
    14,262
    My Mood
    Angelic
    You can import it to resources and load from them without extracting. You can use Enigma virtual box for file virtualization
    . . . malsignature.com . . .



    [ global rules ] [ scam report ] [ image title ] [ name change ] [ anime force ]
    [ league of legends marketplace rules ] [ battlefield marketplace rules ]

    "because everytime you post a picture of anime in here
    your virginity's time increases by 1 month"
    ~Smoke 2/18/2018


    Former Staff 09-29-2018
    Battlefield Minion 07-21-2018
    Premium Seller 03-04-2018
    Publicist 12-10-2017
    League of Legends Minion 05-31-2017
    Premium 02-05-2017
    Member 10-13-2013

  10. #10
    Pschytex's Avatar
    Join Date
    Jul 2016
    Gender
    male
    Posts
    380
    Reputation
    10
    Thanks
    413
    Thanks These informations are good to know!

  11. #11
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,715
    My Mood
    Doh
    Why not just make the entire thing in C#....?

    commando: You're probably the best non-coder coder I know LOL


Similar Threads

  1. [Help] How to fix this Recoil Reducer AHK script?
    By Feroztier in forum Counter-Strike 2 Coding & Resources
    Replies: 1
    Last Post: 03-20-2015, 03:03 AM
  2. How do i use cheat engine scripts or w/e in VB?.
    By Shadowfita in forum Call of Duty Modern Warfare 3 Help
    Replies: 5
    Last Post: 01-23-2012, 02:24 PM
  3. [Solved] Need help with an AHK script
    By Arrowins in forum Call of Duty Modern Warfare 2 Help
    Replies: 1
    Last Post: 06-26-2011, 10:45 PM
  4. How do you use the Weapon Scripts?
    By alex454 in forum WarRock Help
    Replies: 0
    Last Post: 04-17-2011, 05:15 PM
  5. How to edit the MAT Automation Script Using Python
    By helmage2 in forum Mission Against Terror Discussions
    Replies: 0
    Last Post: 02-02-2011, 07:36 AM