topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday April 17, 2024, 8:00 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Kruskal [ switch to compact view ]

Pages: prev1 [2] 3next
26
Post New Requests Here / Need ADH Advice
« on: May 06, 2010, 08:09 PM »
You, Skrommel, were kind enough to write a AHK program for me to provide a hotkey to display a little window showing what program owns the window under the cursor. When pushed a second time, the little window goes away. I use it all the time. (Program at end).

I tried to modify it to be a simple program, rather than a hotkey by removing this line:

!^w::

It sort of works, but the feature of the second call clearing the little window is gone. I don't know the AHK script language at all.  Any idea what I did wrong.

Thanks -- Vincent

PS I wonder why you haven't made this one of your publicly available (or did I miss it). I find it invaluable.

Code: AutoIt [Select]
  1. ;AutoHotkeys.ahk
  2. ;Vincent Kruskal's Hotkeys
  3. ;Skrommel @ 2007
  4. ;Kruskal  @ 2007
  5.  
  6. #SingleInstance,Force
  7. #NoEnv
  8.  
  9. !^w::
  10.   If ToolTipFlag=
  11.     {
  12.       MouseGetPos,x,y,winid,ctrlid
  13.       WinGet,pid,Pid,ahk_id %winid%
  14.       path:=GetModuleFileNameEx(pid)
  15.       ToolTip,%path%
  16.       ToolTipFlag = 1
  17.     }
  18.   Else
  19.     {
  20.       ToolTip,
  21.       ToolTipFlag =
  22.     }
  23.  
  24. #q::
  25.   SoundPlay,C:\Documents and Settings\Administrator\My Documents\My Sound Effects\silence.wav
  26.  
  27.  
  28.  
  29. GetModuleFileNameEx(p_pid) ;by shimanov at www.autohotkey
  30. {
  31.    If A_OSVersion in WIN_95,WIN_98,WIN_ME
  32.    {
  33.      WinGet,name,ProcessName,ahk_id %p_pid%
  34.      Return,name
  35.    }
  36.    h_process:=DllCall("OpenProcess","uint",0x10|0x400,"int",false,"uint",p_pid) ;  PROCESS_VM_READ=0x0010  PROCESS_QUERY_INFORMATION=0x0400
  37.    If (ErrorLevel or h_process=0)
  38.       Return
  39.    name_size=255
  40.    VarSetCapacity(name,name_size)  
  41.    result:=DllCall("psapi.dll\GetModuleFileNameExA","uint",h_process,"uint",0,"str",name,"uint",name_size)
  42.    DllCall("CloseHandle",h_process)
  43.    Return,name
  44. }

Edit by Skwire: Added code tags.

27
Many keyboards, on notebooks at least, have special Vol+, Vol- and Mute buttons.  I recently bought a USB speaker and Vol+ and Vol- have no effect, except to display the normal volume bar. (Strangely Mute still works although the only way to unmute is to use a Vol button which in other ways doesn't work.)

I installed a freebie, Sound Volume Hotkeys, which is really nice for what it does -- provide shortcuts Win+Up and Win+Down to control volume and display a different, but quite nice volume bar.

But it's annoying not to be able to use the special purpose keys and especially since they still have to be used for unmute.

Is there any way for software to see the pushing of Vol+ and Vol- to be able to make this work nicely?  The controls they need to change are those displayed in Control Panel -> Sounds and Audio Devices Properties -> Volume.  I have no idea where the volume level displayed in the volume feedback bar is stored.  Basically THAT number should get fedback to the Windows volume value.

PS If a coding snack could do this, there is one more think which would be handy.  When switching between the USB speaker to the built-in one (or unplugging the USB speaker), the definition of what speaker to use must be manually changed in Control Panel -> Sounds and Audio Devices Properties -> Audio -> Sound playback.  What a drag!  You'd think the system would be smart enough that if the USB speaker is plugged in, I want to use it, and if not, I want to use the built in.  As it is I can be left with no sound at all. Either automating this or, at least, providing an easy shortcut to be given the choice would be great.

As usual, many thanks -- Vincent

28
I've surrendered and switched my secondary monitor to the right.  Now WinWarden works fine for me.

Kruskal: glad to see that sorted out.. sometimes simple solutions are the best.. :)
Well it didn't turn out so great because WinWarden doesn't recognize that I have told it to display on non-existent territory when I am in single monitor mode.  Maybe my situation isn't typical, but I switch a lot -- I only use dual monitors when I am watching media and have a TV available.

I think I'll just give up on the whole thing.

WinWarden would have worked despite this using a left secondary if it worked in that case at all since I would be telling it to place the window at a low X position and that would exist in either case.

Thanks for your good wishes -- Vincent

29
a similar thread on this topic at UltraMon's forums.. it looks like some apps may have to be manually repositioned..

Start a Program on a Specific Monitor


Yeh, I discovered that the Windows Picture and Fax Viewer remembers which monitor it was last used on even after returning to one monitor and going back to two.

Thanks -- Vincent
I've surrendered and switched my secondary monitor to the right.  Now WinWarden works fine for me.  (Also Opera now pops-up its you've got mail message on the primary monitor -- a problem with left secondary monitor that I had not told you all about.)

Thanks to all for all the help -- Vincent

30
a similar thread on this topic at UltraMon's forums.. it looks like some apps may have to be manually repositioned..

Start a Program on a Specific Monitor


Yeh, I discovered that the Windows Picture and Fax Viewer remembers which monitor it was last used on even after returning to one monitor and going back to two.

Thanks -- Vincent

31
XP starts up the application in the same monitor as the last time (if available). If you write the app, you can control this, otherwise, I don't think you can do much.
Interesting.  How do I make an app start on the secondary monitor the first time?

Thanks -- Vincent
You don't need to. You open the program, then drag the window to the second monitor. Close it. It will now open in the second monitor. Different monitor resolutions is no problem. Works for me all the time (I have 1400x1040 on the notebook and 1600x1200 external. Check: Extend my Windows desktop onto this monitor in screen>properties>settings
I wish.  Doesn't work for me with XP and VLC. I wonder what you are doing right.

Vincent

32
you can also use WinWarden for that. check out this thread..

Force PPTView.exe to always show on secondary monitor


According to that discussion, it doesn't work when the monitors are a different size.  In my case, one of them is a TV and that is 640x480.
After some experimentation, I have concluded that the warning about monitors being the same size doesn't apply when the window is small and fits on both.  But I still had trouble.

I have posted by experiences in the original thread above.

Thanks -- Vincent

33
lanux128 - you're a genius  8)

WinWarden works just fine to move the PPT to the second monitor.

For the record, I'm using the following line in WinWarden2.ini:

Creating,PowerPoint Viewer Slide Show - *,,WholeScreen,,1280,0,,,,,,,,,,,,,,

I have two monitors @ 1280x1024, so the new position of 1280,0 moves the PPT window to the upper left corner of monitor #2. Note, this only works if both monitors are the same size. WinWarden will resize the window if desired, but PPTview doesn't recognize that situation, and as such it behaves as if you simply cropped the presentation - it doesn't resize the presentation to match the new window size.

So, problem solved. Yay!
I tried this and it seemed to work when the secondary monitor was  to the right of the primary one.  But when I made it to the left -- where I really want it -- it failed in a strange way.  I used the line:

Creating,VLC media player*,,WholeScreen,,100,100,200,400,,,,,,,,,,,,

This defines a window larger than the default window for VLC.  When I tried it with a single monitor, it worked great.  But when I tried it with a secondary monitor -- a TV -- on the left, it came up on the primary monitor just as it had when that was the only monitor.  But then in a flash, the window was replaced with the default size. 

Any idea why the resize?  Is WinWarden2 supposed to respect the location of the secondary monitor?

Thanks -- Vincent

34
you can also use WinWarden for that. check out this thread..

Force PPTView.exe to always show on secondary monitor


According to that discussion, it doesn't work when the monitors are a different size.  In my case, one of them is a TV and that is 640x480.

35
Try Ultramon.
Reading about UltraMon it seems that an app can only be directed to the secondary monitor when it is started via its icon.  If it is started via the file it is supposed to operate on, it can't be directed to a monitor.  That is, it seems that I can't associate an extension with a monitor.

I have written their tech support to ask if my reading is correct.  Hope not.

Thanks -- Vincent

36
XP starts up the application in the same monitor as the last time (if available). If you write the app, you can control this, otherwise, I don't think you can do much.
Interesting.  How do I make an app start on the secondary monitor the first time?

Thanks -- Vincent
I made a shortcut to VLC on the secondary desktop and when I double-clicked it, it came up on the secondary monitor.  But when I shut it down and double-clicked on a video file, VLC came up on the primary monitor.  So it isn't true that Windows remembers the last monitor an application came up on.

Do I misunderstand your point?

Vincent

37
XP starts up the application in the same monitor as the last time (if available). If you write the app, you can control this, otherwise, I don't think you can do much.
Interesting.  How do I make an app start on the secondary monitor the first time?

Thanks -- Vincent

38
I run Windows XP with dual monitors (sometimes).  The secondary one is a TV.  I'd like to set it up so that applications which play video start on the TV when I have dual monitors (and quietly do nothing when there is only one monitor).

Any ideas -- Vincent

39
Post New Requests Here / Re: ACCENTS: How to Exclude Application
« on: June 21, 2007, 11:50 AM »
:tellme: I'll take a look at it.

Skrommel
Have you had a chance to look at it?

Thanks -- Vincent

40
Post New Requests Here / Re: IDEA: WhoIsThis Hotkey
« on: June 10, 2007, 12:36 PM »
:) Try this script!

That works great!  I changed it to be hotkey driven (Ctr-Alt-W) and it is just what I need.

And my FIRST AutoHotkey script (although you did 99% of the coding)!

Thanks -- Vincent

41
Post New Requests Here / Re: ACCENTS: How to Exclude Application
« on: June 10, 2007, 11:28 AM »
:tellme: I'll take a look at it.

Skrommel
Accents, like any hotkey processor which might send the very key which triggered it, must send that key in such a way as to bypass hotkey processors (or you get an infinite loop).  I'm not quite sure how Accents does this, but I assume it must.

Such hotkey processors should be placed at the end of the chain of hotkey processors to minimize the chance of hotkey conflict.  Does AutoHotkey or Windows have such a feature to control the order of hotkey processors?

Thanks - Vincent

42
Post New Requests Here / IDEA: WhoIsThis Hotkey
« on: June 09, 2007, 11:42 PM »
I'd find it really use for to place the mouse over a window and be told the full path name of the program that this window represents.  I don't know any way to get this information.  I can think of two ways to convey the information back to the user:

1- Pop-up a window with the name.
2- Put the name in the copy buffer.

Or, maybe, the pop-up with an INI option to also place it in the copy buffer.  Or, maybe, have a way for the mouse to tell the pop-up to place its contents in the copy buffer.

Thanks -- Vincent

43
Post New Requests Here / ACCENTS: How to Exclude Application
« on: June 09, 2007, 02:52 PM »
I have application specific hotkeys defined when I run SlingBox ("a" and "c" using PowerPro).  Depending on the relative order that PowerPro and Accents are loaded, my A and C Accents can prevent my A and C SlingBox hotkeys from functioning.  How can I exclude SlingBox from Accents?

Thanks -- Vincent

44
Post New Requests Here / Re: IDEA: Customise Save Dialog
« on: June 05, 2007, 10:37 AM »
Got it now. thanks :up:
I have to type in the directory right from C:\.
I was sure I tried that before but I think I must have been using / by accident because I remember it used to run out of room for letters which it isn't doing now.
Also it doesn't work to select, say, My Documents and then add \<directory>, the whole address needs to be put in.

So now I have exactly what I was after originally. Thanks everybody  :D

PS I have no idea who should get the credit for the picture I use as an avatar. I got it in an email  of funny pictures. It was entitled "How to tell if you spend too much time on your computer".

Its me in the future.
Yes, if you look at the actual format in the Registry, entries like My Documents are integers and the full paths are strings.

I was actually making this change directly in the Registry until I discovered it in TweakUI.  It's not all that much harder (except finding out what all the integers mean).

Glad you got it working -- Vincent

45
Post New Requests Here / Re: Rerun StartUp Folder
« on: June 04, 2007, 01:24 PM »
:) Try ReRun v1.1!

Changes:
- 20070604 - v1.1: Added better detection of command lines.

This means that the startup commands no longer has to contain an extension, and it should be able to detect autostarted folders.

Skrommel
That fixed my problem.  Don't understand why from your description, but thanks so much.

Vincent

46
Post New Requests Here / Re: Rerun StartUp Folder
« on: June 04, 2007, 01:22 PM »
Sounds like the path is not in your environment variables any more.  Look for the System Environment Variables Path to have an entry something like this:

C:\WINDOWS\system32;C:\WINDOWS;C:\Progra~1\ThinkPad\UTILI~1\

There will likely be more.  Also note, each entry is separated by the semicolon ( ; ).  If these are not there, try adding them.
I don't understand what environment variables has to do with it.  Please explain.  PATH is only needed to resolve programs which are not fully qualified, as I understand it.

Vincent

47
Post New Requests Here / Re: IDEA: Customise Save Dialog
« on: June 04, 2007, 10:38 AM »
It doesn't work for me. I tried that straight away and it would let me type in whatever I wanted, it even made a button for me, but nothing happens when I click on it.
Is there any special syntax that needs to be used?

Thanks
I have "C:\TEMP" typed in with no problem.  In fact, after typing "C:\" a menu popped-up showing all the directories immediately in the C drive.

Vincent

48
Post New Requests Here / Re: Rerun StartUp Folder
« on: June 04, 2007, 10:31 AM »
I'm having a problem running ReRun.  First, I gather that it does not just rerun programs in the StartUp folders, but all programs shown in the MSConfig Startup tab.

ReRun terminates on an "Error: Failed attempt to launch program or document: Action: <rundll32 c:\PROGRA~1\ThinkPad\UTILI~1\BatLogEx.DLL,StartBattLog> ".  "Specifically: The system cannot find the file specified."

Well, I can find the file specified, so I have no idea what's happening.  I can note that StartCop doesn't show this startup entry.

Help -- Vincent

49
General Software Discussion / Re: Increasing Notebook PC Volume
« on: June 03, 2007, 11:22 AM »
Just an update - I still haven't heard from the developer - not a good sign. I *did* receive the links for the 10% discount if I purchase during the 14 day trial (I'm on day 5, apparently). Meanwhile the problem persists and I can see no way to fix it. I'll wait until the trial is finished, but I'm not feeling too motivated to purchase. I'm also not hugely impressed by the sound quality, which is quite tinny to my ears. DFX is much warmer... Anyway, Vincent - have you had any response from the developer to your suggestions? Just curious.
They answered about a third of my questions/emails.  I'm not impressed.

But I do like their product.

Vincent


50
Post New Requests Here / Re: IDEA: Customise Save Dialog
« on: June 02, 2007, 10:07 PM »
That is better than filebox extender because it doesn't need to have anything running in the tray; the only problem with it is that it is only customiseable to the limited amount of folders that it lets you choose from.
Is there any way to make it add custom folders?

thanks
It's true that there are a limited number of folders which can be specified from the pull-down menu.  But y
That is better than filebox extender because it doesn't need to have anything running in the tray; the only problem with it is that it is only customiseable to the limited amount of folders that it lets you choose from.
Is there any way to make it add custom folders?

thanks
That is better than filebox extender because it doesn't need to have anything running in the tray; the only problem with it is that it is only customiseable to the limited amount of folders that it lets you choose from.
Is there any way to make it add custom folders?

thanks
It's true that there are a limited number of folders which can be specified with the pull-down menu, you can type in any path you wish.  But it's true that you are limited to five.

Vincent

Pages: prev1 [2] 3next