AutoHotkey Community

It is currently May 27th, 2012, 1:18 pm

All times are UTC [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1036 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 70  Next
Author Message
 Post subject:
PostPosted: August 21st, 2008, 4:12 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
Then the name IsFunc would be a bit misleading. Could we use the & (address of) operator with function names? It can conflict with variable addresses, though, because the same name can refer to a function, a label and a variable. Maybe a better name for IsFunc() is the best, like Address() or FuncAddr()…


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2008, 10:35 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Laszlo wrote:
Then the name IsFunc would be a bit misleading.
That is why it returns a boolean value at the moment. OTOH, I think IsFunc returning a function pointer is comparable to WinExist returning a window handle. Does anyone else have naming suggestions?
Quote:
Could we use the & (address of) operator with function names?
Not without reserving function names. One idea I have is to create a variable for each function, essentially reserving the name. Dynamic function calls could then be extended to call by reference, avoiding a name lookup.

I intend to re-implement more LowLevel functions, since they can be implemented more easily, efficiently, reliably, etc. from the C++ side of AutoHotkey, but it is low on my list of priorities.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 23rd, 2008, 10:56 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Progress: the debugging features are minimally functional. breakpoint_set, run, step_into, step_over, step_out and stop are supported (see DBGP.)

Image
[XDebugClient with added AutoHotkey syntax-highlighting.]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 23rd, 2008, 8:00 pm 
the DBGP debugging features above are really great and i can't wait until they are implemented, but a lot of times all i need to see are the line listings, which sometimes i can't becuase of timers and loops

wouldn't this be easy to implement?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 24th, 2008, 1:38 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
I keep an eye on the Wish List forum, so it is no surprise I had already seen your three existing threads (1, 2, 3). I would prefer feature wishes be kept in the Wish List forum, separate from this thread, unless they relate directly to a feature I have implemented or plan to implement.

If I see an idea in Wish List that interests me, I will consider implementing it. (For instance, Optimized DllCall().)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 5th, 2008, 3:57 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Quote:
Revision 11 - September 5, 2008
  • Fixed: Remove checksum from AutoHotkeySC.bin via post-build script (AutoHotkey must be installed).
  • Added: .L suffix to A_AhkVersion.
  • Added: Preliminary support for DBGp (interactive debugging)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 6th, 2008, 2:22 pm 
Offline

Joined: July 29th, 2005, 5:32 pm
Posts: 179
Lexikos wrote:
Added: Preliminary support for DBGp
Thank you for this! This is going to come in very handy.. :D

_________________
.o0[ corey ]0o.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2008, 1:15 pm 
Offline

Joined: June 17th, 2008, 7:51 am
Posts: 243
Hi Lexikos,
I think, you've done a great job. It's fantastic. Can I also compile a script with your adaptions? And if so, how do I manage it?

_________________
Greetings
Rog


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2008, 1:22 pm 
Offline

Joined: November 2nd, 2004, 2:43 pm
Posts: 1019
Location: London, UK
Rename your old autohotkeySC.bin and replace it with lexicos's. You will then be able to compile using the normal compiler.

_________________
Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2008, 1:44 pm 
Offline

Joined: June 17th, 2008, 7:51 am
Posts: 243
Thanks a lot. Life can be so easy, when you know, what you do. :oops:

_________________
Greetings
Rog


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 30th, 2008, 5:22 am 
problem: use hotkey to replace AltTab ignores #if condition
Code:
#If (expression)
RAlt & o::AltTab
RAlt & p::ShiftAltTab
#If


Report this post
Top
  
Reply with quote  
 Post subject: Problem with #If
PostPosted: October 14th, 2008, 8:32 am 
Offline

Joined: June 17th, 2008, 7:51 am
Posts: 243
Hi Lexikos,

I've got a little problem with your fantastic and long time expected #If. I use it basically with the function MouseIsOver and normally it works very well.

My problem is: I have one script running the whole day with my all-day-long-hotkeys. One of these is MButton:: with different #If MouseIsOver actions depending on different applications. But these MButton-hotkeys stop working, when I start another script with additional MButton-hotkeys triggered by #If MouseIsOver for a very special application.

With ListLines I can see, that all #If MouseIsOver-functions of script 2 are executed without success (which is correct). But afterwards the MButton-Hotkeys of script 1 aren't executed any more.

With #IfWinActive these problems never occured, so I'm hopefull, that this is only a bug which can be solved quickly. Thanks for this.

_________________
Greetings
Rog


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2008, 10:08 am 
Hi Lexikos,

I'm afraid, I found another bug. When I compile a script with Ahk2Exe.exe and your AutoHotkeySC.bin and the noDecompile-parameter, I get the errormessage
Quote:
Could not extract script from EXE.
when I start the compiled exe.

I would love, to get this solved as well. Thanks.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2008, 12:23 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Guest wrote:
problem: use hotkey to replace AltTab ignores #if condition
This is normal behaviour.
Quote:
Source: AutoHotkey Documentation: #IfWinActive / #IfWinExist
Alt-tab hotkeys are not affected by #IfWin: they are in effect for all windows.

ruespe wrote:
One of these is MButton:: with different #If MouseIsOver actions depending on different applications. But these MButton-hotkeys stop working, when I start another script with additional MButton-hotkeys triggered by #If MouseIsOver for a very special application.
I am unable to reproduce this. Perhaps there is more to your scripts than mine:
Code:
#If MouseIsOver("ahk_class CabinetWClass")
*MButton::MsgBox Explorer
#If MouseIsOver("ahk_class Shell_TrayWnd")
*MButton::MsgBox Tray

MouseIsOver(WinTitle)
{
    MouseGetPos,,, MouseWinId
    ifWinExist, %WinTitle% ahk_id %MouseWinId%
        return MouseWinId
    else
        return 0
}
Code:
#If MouseIsOver("ahk_class SciCalc")
*MButton::MsgBox Calc
#If MouseIsOver("ahk_class Notepad")
*MButton::MsgBox Notepad

;...
Note that if the (iirc) most recently loaded script handles the hotkey (because the #if expression evaluates to true), the other script will not consider executing the hotkey, so will not need to evaluate the #if expression.
ruespe(nl) wrote:
When I compile a script with Ahk2Exe.exe and your AutoHotkeySC.bin and the noDecompile-parameter, I get the errormessage
There is an easy solution - don't use NoDecompile.

Compiling AutoHotkey from fresh v1.0.47.06 source in Visual C++ 2008 gives the same result. I can think of two possibilities:
  1. An obscure quirk of Visual C++ 2008, a difference between 2008 and 2003, or a side-effect of the project conversion process prevents NoDecompile from "working" correctly. (Chris uses Visual C++ 2003.) This could be confirmed by anyone with access to Visual C++ 2003.
  2. NoDecompile functionality has been removed from the public source code to prevent exploitation. I would not expect this to be the case; however, it is apparent that the public source code of Ahk2Exe "handles" the /NoDecompile flag, but does not actually do anything with it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 22nd, 2008, 10:31 am 
Offline

Joined: June 17th, 2008, 7:51 am
Posts: 243
Lexikos wrote:
Note that if the (iirc) most recently loaded script handles the hotkey (because the #if expression evaluates to true), the other script will not consider executing the hotkey, so will not need to evaluate the #if expression.

Well, you're right. I had a #If (only) section with a MButton & Wheelup::-Hotkey in the most recently loaded script. And this Hotkey already prevents the execution of the mbutton::-Hotkey through the second script, even if it fails (because I only press MButton).
Code:
;Start this first
;The Hotkeys will not work because of the
;    #If
;    MButton & WheelUp::MsgBox MButton & WheelUp
;in the 2nd script


#SingleInstance force
SetTitleMatchMode, 2 ;A window's title can contain WinTitle anywhere inside it to be a match
#If MouseIsOver("Notepad++")
*MButton::MsgBox Notepad++
#If MouseIsOver("Total")
*MButton::MsgBox Total Commander

MouseIsOver(WinTitle)
{
    MouseGetPos,,, MouseWinId
    ifWinExist, %WinTitle% ahk_id %MouseWinId%
        return MouseWinId
    else
        return 0
}

Code:
#SingleInstance force
SetTitleMatchMode, 2 ;A window's title can contain WinTitle anywhere inside it to be a match
#If MouseIsOver("Calendar")
MButton::MsgBox Calendar
#If MouseIsOver("Inbox")
MButton::MsgBox Inbox
#If
MButton & WheelUp::MsgBox MButton & WheelUp


MouseIsOver(WinTitle)
{
    MouseGetPos,,, MouseWinId
    ifWinExist, %WinTitle% ahk_id %MouseWinId%
        return MouseWinId
    else
        return 0
}
When I delete the MButton & WheelUp::-Hotkey, everything works fine. I can live with it.

Lexikos wrote:
There is an easy solution - don't use NoDecompile.
Oh, so easy? I'm sure, I'm able to do this :lol:

Thank you very much.

_________________
Greetings
Rog


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1036 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 70  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 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