AutoHotkey Community

It is currently May 26th, 2012, 10:43 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: September 14th, 2009, 7:52 am 
Offline

Joined: April 29th, 2009, 12:08 pm
Posts: 45
hey guys, having trouble getting the name of a windows recorded when the hotkey is pressed

only an empty file is being written, i am so confused and the damn help file is no help, here is the code:
Code:
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;   Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

^LButton::
MouseGetPos, WinX, WinY, Winget
WinGetTitle, Winget,%Winget% ;<--- this line of code has been removed
FileSelectFolder, SWNT
InputBox,SWNA, Save redorded window name as?`nalso include the extension
FileAppend,,%SWNT%\%SWNA%
FileAppend,%Winget%,%SWNT%\%SWNA%
return


all help is appreciated, tx guys

*edit* removed a line of code, see the code

am now getting this in my output file from a window title recording attempt:
0x318ac

_________________
frosty the snowman

Ex-AutoIt user

class: intermediate


Last edited by fro01 on September 14th, 2009, 10:18 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2009, 8:34 am 
Online

Joined: April 8th, 2009, 7:49 pm
Posts: 6066
Location: San Diego, California
Quote:
i am so confused and the damn help file is no help,


Look at the example:
http://www.autohotkey.com/docs/commands/MouseGetPos.htm

George: Hey Fred?

Fred: Yeah George?

George: What happened to the last guy that bad-mouthed the helpfile?

Fred: Banished to the *corn-field, if I remember correctly. :( :cry:

George: Yep, you're right. Poor fellow. :cry:

* = "Twilight zone" episode starring actor Billy Mummy.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2009, 9:54 am 
Offline

Joined: April 29th, 2009, 12:08 pm
Posts: 45
same as whats in the help file, tried that

anything else you guys can suggest by any chance?

*edit* using windows 7

*edit2* tried a msgbox to troubleshoot Window, for some reason its just not getting anything at all

_________________
frosty the snowman

Ex-AutoIt user

class: intermediate


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2009, 10:11 am 
fro01 wrote:
Code:
^LButton::
MouseGetPos, WinX, WinY, Winget
WinGetTitle, Winget, ahk_id %Winget% ;<--- this line was wrong and is need to get the window title
msgbox, %WinGet%
return


help file wrote:
OutputVarWin

This optional parameter is the name of the variable in which to store the unique ID number of the window under the mouse cursor. If the window cannot be determined, this variable will be made blank.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2009, 10:17 am 
Offline

Joined: April 29th, 2009, 12:08 pm
Posts: 45
thankyou guest32 whoever you are, that has solved my problem tx again :)

_________________
frosty the snowman

Ex-AutoIt user

class: intermediate


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2009, 6:58 pm 
Online

Joined: April 8th, 2009, 7:49 pm
Posts: 6066
Location: San Diego, California
Congrats! glad Guest32 was able to help :) But, of course, you already tried that :oops:

Guest32 wrote:
MouseGetPos, WinX, WinY, Winget
WinGetTitle, Winget, ahk_id %Winget% ;<--- this line was wrong and is need to get the

http://www.autohotkey.com/docs/commands/MouseGetPos.htm
Code:
MouseGetPos, , , id, control
WinGetTitle, title, ahk_id %id%


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 16th, 2009, 3:38 am 
Offline

Joined: April 29th, 2009, 12:08 pm
Posts: 45
Ouch! i missed that part of the help file!

*apologizes to the helpfile and gives a guilty hug*

lol

_________________
frosty the snowman

Ex-AutoIt user

class: intermediate


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], JSLover, Miguel, rbrtryn, XstatyK and 58 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