AutoHotkey Community

It is currently May 27th, 2012, 11:54 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Crash
PostPosted: November 9th, 2005, 8:04 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
The following script shows a tooltip when the active window is full screen. If I play with it for a while (move the mouse, click in random locations, show desktop, start the screen saver, make Pinball full screen: F4 and windowed again: Esc) it always crashes AHK. It does not take 2 minutes.
Code:
#Persistent

ScWidth  = %A_ScreenWidth%
ScHeight = %A_ScreenHeight%

SetTimer Clock
Return

Clock:
   WinGetClass Class, A
   WinGetPos,,,W,H, A
   If (Class <> "Progman" and Class <> "WorkerW" and Abs(ScWidth-W) < 3 and Abs(ScHeight-H) < 3)
   {
      TT = 1
      ToolTip %Class% FULLSCREEN ; only at fullscreen application
   }
   Else If TT
   {
      TT =
      ToolTip                    ; when shown, clear at windowed application,
   }
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2005, 9:54 pm 
Hey, man - stop wasting your time playing pinball - the world is waiting for your next great script!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2005, 10:06 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
I did not know you were watching...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2005, 10:19 pm 
Offline

Joined: November 7th, 2005, 8:32 pm
Posts: 10
Location: Germany
Ok, excused, thats why I used the wrong screen, where i wasnt logged in.

In the meentime, I tried your script. After having some problems to get a tooltip to view at all, because the h+w-values differ in nearly all the applications by 8, so your diff-3 doesnt work as we all would have expected,
i can inform you that it workswell in all applications i tried it with, but tt doesnt appear at all when i start pinball.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2005, 10:40 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
How about changing both "< 3" to "< 9" or even larger? At some point you should see the tooltip in Pinball.
No crash?
I use XP SP2 on a laptop with 1920x1200 screen. What is in your system?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2005, 11:10 pm 
Offline

Joined: November 7th, 2005, 8:32 pm
Posts: 10
Location: Germany
Yes of course, i was generous and changed it to 15 after i found out, and as i said, it works fine with all Apps u tried but pinball )i forgot to mention that, togetit running i shortend yor if to just compar the screendims, i started it 35 minutes ago on laptop and desktop (both xp-sp2) and it informs me each time i switch to fullscreen - but not in pinball!

First pinball-call - no tooltip.

Second call: Autohotkey informs me, that it is terminating (After pressing ok, your script is still up and running, same as my own scripts)

Third call: Initial pinball-screen shows tooltip !!!
Than pinball is shown in window. I select options+fullscreen - no tooltip!
Than MY script crashes - thats to much, Im out of this topic!

This has been my first call of that M$-pinball-shit after perhaps fifteen years - and definitely the last for the next 50!

My tip: dont worry, just uninstall pb and youll never have that problem again (sorry, that i have no better advice, but I think shimanov will have)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2005, 11:24 pm 
Offline

Joined: November 7th, 2005, 8:32 pm
Posts: 10
Location: Germany
I hate to say that: it was not that M$-pinball-shit, you can re-install it!

I changed the h+w-difference to 255, to get the tooltip more frequently (I hate fullscreens too!) - now the script is crashing with other apps, too.
Will try if it works with a SetTimer-delay.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2005, 5:01 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
If it only crashes in that one game, I might have trouble reproducing it. I don't have any pinball games currently installed, not even the one that comes with the OS (assuming they still include it).

If you ever find an easier way to reproduce it -- or if this particular game is easy to find and install -- please let me know.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2005, 5:06 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
The crash is not related to Pinball. It is hard to reproduce, though, you need to click a lot, minimize, maximize, full-screenize windows, but the posted script crashes sooner or later. If I remove the return command, it seems to become more stable.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2005, 5:12 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks. I can now reproduce this crash. There is a problem with expressions or function calling and I'll try to get to the bottom of it via debug mode.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2005, 6:43 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I believe this has been fixed in v1.0.40.06: "Fixed crash of abs() when called with an empty string."

In the case of the script above, I think the parameter passed to Abs() can be the empty string in cases where WinGetPos retrieved blank values because there is no active window. Having no active window, while unusual, has been observed to happen.

Thanks for reporting it. If you have any more trouble with it, please let me know.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

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