AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Tips N Tricks] How to set a 'Tiled background' for GUI ?
Goto page Previous  1, 2, 3 ... 29, 30, 31, 32, 33  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Fri Jun 25, 2010 7:31 am    Post subject: Re: Thanks Reply with quote

AaronStarr wrote:
SKAN wrote:
You could try Graphic Buttons : http://www.autohotkey.com/forum/viewtopic.php?t=4047


Great. Thanks for the pointing that out. Your code is Awesome too.



Thanks!

BTW, Do you see the problem when I [Quote] your post ?!
Your need to put your signature in your profile: http://www.autohotkey.com/forum/profile.php?mode=editprofile
Back to top
View user's profile Send private message Send e-mail
lbl
Guest





PostPosted: Sat Aug 14, 2010 10:03 pm    Post subject: Re: TipsNTricks: How to retrieve File fullpath from Explorer Reply with quote

SKAN wrote:
Quote:
How to retrieve File fullpath from Explorer ?
http://www.autohotkey.com/forum/viewtopic.php?p=86542#86542

Quote:
[size=12]Foreword: I was trying to help Zak M. in the Ask for Help Topic: Select a file and copy its location and my find is very helpful for me too! I thank him for that! Very Happy

Solution: Create a "Drag and Drop" enabled GUI and drag the files to it with MouseClickDrag . Handle the retrieved full path of file(s) in GuiDropFiles label as required.


Nice idea! I also propose an alternate solution, using the magic operation "Clipboard = %Clipboard%". Maybe others already mentioned that solution?


Code:

#c::
    ;Using this #c instead of the usual ^c will copy the full path of the file instead of the reference of the file
    Clipboard =
    Send, ^c
    ClipWait, 1
    Clipboard = %Clipboard%
    ToolTip, Clipboard : %ClipBoard%
    KeyWait, LWin
    ToolTip
Return
Back to top
fragman



Joined: 13 Oct 2009
Posts: 1199

PostPosted: Sun Aug 15, 2010 10:34 am    Post subject: Reply with quote

I think using COM is the preferred way for explorer. Does not work with file dialogs or desktop though. It has been posted on the forums before, if you can't find it I can try to dig it up.
Back to top
View user's profile Send private message
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Mon Aug 16, 2010 8:17 pm    Post subject: Reply with quote

I have a small request for how to brute force constants ( avoiding crashes if possible ).
I'd like to be able to find some undoc'd allusive magical hex if possible Wink.

thnx
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Tue Aug 17, 2010 6:26 am    Post subject: Reply with quote

TLM wrote:
I have a small request for how to brute force constants ( avoiding crashes if possible ).


Them are made for each other Wink
But if you want to know how constants work, then it is quite a story and maybe I can post a tut. Smile
Back to top
View user's profile Send private message Send e-mail
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Tue Aug 17, 2010 3:32 pm    Post subject: Reply with quote

SKAN wrote:
TLM wrote:
I have a small request for how to brute force constants ( avoiding crashes if possible ).


Them are made for each other Wink
But if you want to know how constants work, then it is quite a story and maybe I can post a tut. Smile

Yes please Mr. Green!

I mean I think I get the part of ratcheting threw sequential hex vals and seeing what each returns.
Its knowing exactly what the return part/errorlevel is doing that seems like it would be confusing.
Anyhoo, I'm sure this would come in handy for many users Wink..

Thnx again in advance..
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
dotslashc



Joined: 28 Oct 2010
Posts: 9

PostPosted: Thu Oct 28, 2010 3:41 am    Post subject: Re: How to Hook on to Shell to receive its messages ? Reply with quote

SKAN wrote:

Code:
Gui +LastFound
hWnd := WinExist()

DllCall( "RegisterShellHookWindow", UInt,hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )

Return ;                                                 // End of Auto-Execute Section //

ShellMessage( wParam,lParam ) {
; Execute a command based on wParam and lParam
}



Hi,
THanks for this. I have a question regarding this? How do I add this code to default Autohotkey script that I use (the one with my regular hotkey /hotstrings etc?)

I tried adding this code as it is at end of the file , it doesn't work however.
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Thu Oct 28, 2010 3:48 am    Post subject: Re: How to Hook on to Shell to receive its messages ? Reply with quote

dotslashc wrote:
I tried adding this code as it is at end of the file , it doesn't work however.


Code:
Return ;                                                 // End of Auto-Execute Section //


Please refer AHK Documentation for 'auto-execute section'.
Revert back if you have a problem in understanding the concept.

Smile
Back to top
View user's profile Send private message Send e-mail
dotslashc



Joined: 28 Oct 2010
Posts: 9

PostPosted: Thu Oct 28, 2010 7:23 am    Post subject: Re: How to Hook on to Shell to receive its messages ? Reply with quote

SKAN wrote:
dotslashc wrote:
I tried adding this code as it is at end of the file , it doesn't work however.


Code:
Return ;                                                 // End of Auto-Execute Section //


Please refer AHK Documentation for 'auto-execute section'.
Revert back if you have a problem in understanding the concept.

Smile


Silly me. Embarassed
Thanks for the pointer.
Back to top
View user's profile Send private message
dotslashc



Joined: 28 Oct 2010
Posts: 9

PostPosted: Thu Oct 28, 2010 7:53 am    Post subject: Reply with quote

Unfortunately not working for me still.
I am trying to include some other scripts i found here.
Code:
#include %A_ScriptDir%\My Scripts\notifylockunlock.ahk
#include %A_ScriptDir%\My Scripts\iSwitcher.ahk

notify_lock_unlock()
; Calls function "on_lock()" when computer is locked and "on_unlock()" when computer is unlocked


Does location of these lines make difference? My understanding is that #include directive execute the script in included AHK file immediately. Will the return command in included file affect what I am trying to do?

If I put above code before the following code
Code:
Gui +LastFound
hWnd := WinExist()

DllCall( "RegisterShellHookWindow", UInt,hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )
Return


Then only iSwitcher and notifyunlocklock works. If I put it later only the "RegisterShellHookWindow" code works. Sad

I really want to keep my include files seperate. Any workaround?


Last edited by dotslashc on Thu Oct 28, 2010 7:59 am; edited 1 time in total
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Thu Oct 28, 2010 7:58 am    Post subject: Reply with quote

It is preferable that you use #include at the end of the script.
Back to top
View user's profile Send private message Send e-mail
dotslashc



Joined: 28 Oct 2010
Posts: 9

PostPosted: Thu Oct 28, 2010 8:04 am    Post subject: Reply with quote

SKAN wrote:
It is preferable that you use #include at the end of the script.


Yup, tried this. Now my iSwitcher script is causing issue. The pretty UI of this script doesn't show up.

Edit: I guess I have no choice but to run iSwitcher in seperate script.
Back to top
View user's profile Send private message
Deo



Joined: 16 May 2010
Posts: 172

PostPosted: Fri Oct 29, 2010 10:51 am    Post subject: Reply with quote

hi all
Can anyone give a hint on how to track that files dragging is occuring over the gui?

I couldn't find any messages which would help me, the only one that related to dragging it is WM_DROPITEM (or something like that), but it occurs only when you release dragged item

If you have any thoughts about this, please don't hide

It seems i need to get this events:
http://msdn.microsoft.com/en-us/library/ms742859.aspx#Drag_and_Drop_Events
DragEnter and DragOver
how can i do this with COM?
Back to top
View user's profile Send private message
ruespe*
Guest





PostPosted: Mon Nov 15, 2010 7:39 pm    Post subject: ea2apaza Reply with quote

SKAN wrote:
How to search and replace a text string present in a Binary file ?

I have seen repeated requests for changing the ahk_class for compiled scripts' GUI.
Credit: The technique of string replacement in AutoHotkeySC.bin with a Hex editor was posted by Serenity here : Compiled scripts Window class

I present my pure AHK version of the said technique. It is neither very fast, nor too slow, but should suffice for quick toggling of the ahk_class:

Code:
; AutoHotkeySC.bin Patcher / Written by A.N.Suresh Kumar AKA "Goyyah", 24-Nov-2006.

SetBatchLines, -1

ahk_class_exi := "AutoHotkeyGUI" ; Hopefully not been changed already by the script.
ahk_class_new := "AHK-GUI      " ; Pad enough spaces to match length of above var.
StringLeft, ahk_class_new, ahk_class_new, 15     ; Make sure of the writable length.

AHKSC :=  RegExReplace(A_AhkPath, "(.*)\\.*$", "$1") . "\Compiler\AutoHotkeySC.Bin"
IfNotExist, %AHKSC%, ExitApp     ; Make sure that the file exists.
FileGetSize, binDataSz, %AHKSC%  ; StrLen() does not work for Binary data
FileRead   , binData  , %AHKSC%  ; Read the whole file into a variable

Loop, %binDataSz%                       
  If ( *(&binData+(A_Index-1)) = 0 )
     DllCall( "RtlFillMemory", UInt,&binData+(A_Index-1), Int,1, UChar,32 )

; The above loop tinkers the binData by replacing Null Characters with Spaces
                                 
StrOffset := InStr( binData, ahk_class_exi ) - 1
If (StrOffset < 0) {
   MsgBox, 16, AutoHotkeySC.bin Patcher, String not found !? :: %ahk_class_exi%
   ExitApp     
                   }     

; Following are obsolete 16Bit file IO functions that gets the patchwork done!

hFile := DllCall( "_lopen", Str,AHKSC, Int,0x2 )
DllCall( "_llseek", Int,hFile, Int,StrOffset, Int,0 )
DllCall( "_lwrite", Int,hFile, Int, &ahk_class_new, Int,StrLen(ahk_class_new) )
DllCall( "_lclose", Int,hFile )

MsgBox, 64, AutoHotkeySC.bin Patcher, Successfully Patched :: %ahk_class_new%, 10


That is it Exclamation Question

PS: I am not satisfied. I have explained only about UCHAR that occupies a single memory byte. There are WORD ( 2 byte ) and DWORD ( 4 byte ) that stores 32 bit integers..... But, this post is already too long Sad . Maybe later! Smile

Regards, Smile

Hi Skan,
you already mentioned, that there may be WORD and DWORD-Characters. Now with AHK_L it has happened. With the latest AHK_L-version of Autohotkey.bin the Autohotkey.bin patcher isn't running any more (Errormsg String not found !?). I think, it's only a small change for you, but a giant step for me. So would it be possible to adapt yout script to AHK_L and UTF-8?

Thanks in advance.
Back to top
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Tue Nov 16, 2010 1:11 pm    Post subject: Re: ea2apaza Reply with quote

ruespe* wrote:
would it be possible to adapt yout script to AHK_L


Code:
; AutoHotkeySC.bin String Patcher for AHK_L 32b Unicode             / by SKAN 16-Nov-2010.

PathToAHKSC := "E:\Lexikos\AutoHotkeySC.bin"
     StrOld := "AutoHotkeyGUI"
     StrNew := "MyGUI"

FileGetSize, Sz, %PathToAHKSC%
FileRead, Bin, *c %PathToAHKSC%

nLen   := StrLen( StrOld ) * 2
VarSetCapacity( StrRep, nLen, 0 )
StringLeft, StrRep, StrNew, %nLen%

If ( ( Off := InBuf( &Bin,Sz, &StrOld,nLen ) ) < 0 ) {
 MsgBox, 16, AutoHotkeySC.bin Patcher, String not found !? :: %StrOld%
 ExitApp
}

hFile := DllCall( "_lopen", AStr,PathToAHKSC, Int,0x2 )
DllCall( "_llseek", UInt,hFile, UInt,Off, Int,0 )
DllCall( "_lwrite", UInt,hFile, UInt,&StrRep, UInt,nLen )
DllCall( "_lclose", UInt,hFile )

Return ;                                                 // end of auto-execute section //


InBuf( hayP,hayS, neeP,neeS, sOff=0 ) {    ; slightly altered version of InBuf() by wOxxOm
 Static InBuf      ; Original version available @ www.autohotkey.com/forum/topic25925.html
 If ( ! VarSetCapacity( InBuf ))  {
     FiH =
     ( LTrim Join
       530CEC83E58955|5D8B9C57565251|C28E0F00FB8314|8B104D8B000000|41D929C1291845|8B000000
       B18E0F|0C758BC701087D|2A744BACFCC031|4B36744B2D744B|AD933F754B1474|008B850FAEF293|E
       BF4751F390000|7F75AEF2AD4E75|68EBF775FF4739|8A62EB7475AEF2|27386C75AEF226|AD669356E
       BF875|39665E75AEF293|434E47EBF7751F|C1DA89FC7589AD|E283F45D8902EB|87DF87F8558903|AE
       F2CA87FB87D1|F775FF47393775|03C783CA89FB89|85F44D8BFC758B|DE75A7F30474C9|0474C985F8
       4D8B|4FDF89D375A6F3|5F9D08452BF889|14C2C95B595A5E|F0EBD0F7C03100
     )
 VarSetCapacity( InBuf,224,0 )
 Loop, Parse, FiH, |
   NumPut( "0x" A_LoopField, InBuf,(7*(A_Index-1)), "Int64" )
 }
Return DllCall( &InBuf, UInt,hayP, UInt,neeP, UInt,hayS, UInt,neeS, UInt,sOff )
}

; "AutoHotkeyGUI" in Unicode hex: 4100750074006F0048006F0074006B0065007900470055004900

Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... 29, 30, 31, 32, 33  Next
Page 30 of 33

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group