AutoHotkey Community

It is currently May 27th, 2012, 12:08 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 65 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: August 21st, 2011, 9:22 pm 
Offline

Joined: February 20th, 2011, 9:42 pm
Posts: 433
Location: Cache Creek B.C.
perfect! :) that's amazing stuff.

_________________
Some of my scripts :).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 25th, 2011, 3:30 pm 
Ok, so I am trying to include a few exe files in a gui. But I am still really noobish, so can I get an example? Here's my gui, real simple.

Code:
Gui, Font, S14 CDefault Bold, Verdana
Gui, Font, S14 CDefault Bold, Verdana
Gui, Add, Text, x42 y0 w280 h30 , Borderlands Res Changer
Gui, Font, S10 CDefault Bold, Verdana
Gui, Add, Button, x22 y40 w150 h30 , 1366x768
Gui, Add, Button, x182 y40 w150 h30 , 1920x1080
; Generated using SmartGUI Creator 4.0
Gui, Show, x573 y371 h97 w361, New GUI Window
Return


Button1366x768:
run, "C:\WillowEngine1366.exe"
return

Button1920x1080:
run, "C:\WillowEngine1920.exe"
return

GuiClose:
ExitApp


So if I were to paste my converted exe files beneath here, how do I change the buttons?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 26th, 2011, 4:41 pm 
Offline

Joined: June 7th, 2010, 3:40 pm
Posts: 553
Code:
Gui, Font, S14 CDefault Bold, Verdana
Gui, Font, S14 CDefault Bold, Verdana
Gui, Add, Text, x42 y0 w280 h30 , Borderlands Res Changer
Gui, Font, S10 CDefault Bold, Verdana
Gui, Add, Button, x22 y40 w150 h30 , 1366x768
Gui, Add, Button, x182 y40 w150 h30 , 1920x1080
; Generated using SmartGUI Creator 4.0
Gui, Show, x573 y371 h97 w361, New GUI Window
Return


Button1366x768:
IfNotExist,C:\WillowEngine1366.exe
WillowEngine1336_Extract("C:\WillowEngine1336.exe")

run, "C:\WillowEngine1366.exe"
return

Button1920x1080:
IfNotExist,C:\WillowEngine1920.exe
WillowEngine1336_Extract("C:\WillowEngine1920.exe")

run, "C:\WillowEngine1920.exe"
return

GuiClose:
ExitApp
Return

;Functions to extract the exes



Something like that, ofcourse make sure the names of the functions are correct.

_________________
(Statistics script) M&K Counter 2.0
My FAST ini Lib
Minecraft NBT Lib


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2012, 9:30 am 
Offline

Joined: June 7th, 2010, 3:40 pm
Posts: 553
Updated to 2.3

Fixed: the script would not work with AHK _L x64
Changed: functions generated by this script with any version of AHK should now work with any version of AHK

_________________
(Statistics script) M&K Counter 2.0
My FAST ini Lib
Minecraft NBT Lib


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2012, 4:10 pm 
Very nice. It would be nice to have an option to extract data into a variable.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2012, 5:48 pm 
Offline

Joined: June 7th, 2010, 3:40 pm
Posts: 553
The function already stores the information in a variable before writing it to the hard drive.

The problem is, most information you want to store this way can't be accessed directly from a variable or AHK doesn't know how.

What do you want to extract to a variable anyway?

_________________
(Statistics script) M&K Counter 2.0
My FAST ini Lib
Minecraft NBT Lib


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2012, 6:09 pm 
Rseding91 wrote:
The problem is, most information you want to store this way can't be accessed directly from a variable or AHK doesn't know how.
I see.

Quote:
What do you want to extract to a variable anyway?
It would be mostly images, audio files, and encrypted text documents. I often find that creating setting files and extracting resource files around the script executable is messy. The script user has to think whether to copy other files besides the executable when he/she moves/copies the program to another location.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2012, 6:42 pm 
Offline

Joined: June 7th, 2010, 3:40 pm
Posts: 553
Encrypted text would be no problem.

Images/audio - you would need to find a way to make AHK able to use those from a variable. As it is now every AHK command wants a filepath+name.

_________________
(Statistics script) M&K Counter 2.0
My FAST ini Lib
Minecraft NBT Lib


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2012, 4:37 pm 
@Rseding91: would it be possible to adapt your functions to convert ClipboardAll to a base64(?) string - probably not that difficult - but more importantly revert it back so you can restore the clipboard content from the base64 string? (Ideally without writing any files, but I wouldn't mind if it did)

Because your functions work with all AutoHotkey versions I thought I ask here (as I fail miserably with the Get/SetClipboardData functions that float around)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2012, 12:49 am 
Offline

Joined: June 7th, 2010, 3:40 pm
Posts: 553
Maybe, but it would be the same if not more work then trying to figure out one of the setclipboarddata functions.

_________________
(Statistics script) M&K Counter 2.0
My FAST ini Lib
Minecraft NBT Lib


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2012, 6:16 am 
Offline

Joined: November 8th, 2009, 6:36 am
Posts: 67
Location: Denmark
It seems that your script does not work when used by AHK's library function.

If I create a file named Extract_7Zip in the library with Extract_7Zip and Get_7Zip functions inside and call Extract_7Zip from a script it will fail with the following error.

Warning: Using value of uninitialized variable.
Bla bla 3-4 lines of the data of 7Zip.exe

Then i push enter and get a nye error.

Warning in #include file:
Line 71
A_isUnicode (a local variable.)

Edit: Autohotkey_L ANSI 32bit on a 64bit system.
Edit2: Looks like the file is extracted after the error.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2012, 6:39 am 
Offline

Joined: June 7th, 2010, 3:40 pm
Posts: 553
Ahhh... I know what's going on. AHK_L (recently ?) changed some code to generate warnings for a few things. I'll test with it and see if I can't get those warnings to go away.

They are just warnings - not errors :)

_________________
(Statistics script) M&K Counter 2.0
My FAST ini Lib
Minecraft NBT Lib


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2012, 6:56 am 
Offline

Joined: June 7th, 2010, 3:40 pm
Posts: 553
Ok, I figured it out.

AHK_L ANSI does not define "A_IsUnicode" so it throws a warning when you have #Warn enabled for unset variables.

I'm going to post this and see what the maker of AHK_L thinks. For now simply ignore that error and or disable #Warn for "UseUnsetLocal" to get rid of it.

_________________
(Statistics script) M&K Counter 2.0
My FAST ini Lib
Minecraft NBT Lib


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2012, 7:14 am 
Offline

Joined: November 8th, 2009, 6:36 am
Posts: 67
Location: Denmark
Thank you.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2012, 11:40 pm 
Offline

Joined: June 7th, 2010, 3:40 pm
Posts: 553
nomissenrojb wrote:
Thank you.


Resolved (in the next AHK_L release): http://www.autohotkey.com/forum/topic82371.html

_________________
(Statistics script) M&K Counter 2.0
My FAST ini Lib
Minecraft NBT Lib


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 65 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], notsoobvious and 10 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group