AutoHotkey Community

It is currently May 27th, 2012, 12:46 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: March 31st, 2010, 12:38 pm 
Offline

Joined: October 20th, 2009, 6:36 am
Posts: 10
Hi all,

I've created a GUI with ability to choose the language. Therefore I read an *.ini (ger or eng) and set the text of buttons etc.

Code:
...
Gui, Add, Button, x30 y255 w120 gStartGame vStartGame, %str_startgame%
Gui, Add, Button, x30 y345 w120 gJoinGame vJoinGame, %str_joingame%
Gui, Add, Edit, x30 y370 w87 R1 vServerIP, %ServerIP%
...


No probs so far ...
How will it be possible to enable also language related tooltips?

"ger.ini"
Code:
str_startgame=Spiel starten
str_joingame=Spiel beitreten
str_startgame_TT=Tooltip of 'Spiel starten' in German
str_joingame_TT=Tooltip of 'Spiel beitreten' in German


"eng.ini"
Code:
str_startgame=Start game
str_joingame=Join game
str_startgame_TT=Tooltip of 'Start game' in English
str_joingame_TT=Tooltip of 'Join game' in English


All variables are global (I use "ini_exportToGlobals" of Tuncay's ini Lib http://www.autohotkey.com/forum/viewtopic.php?t=46226)

I tried some methods, one with
Code:
MouseGetPos, , , , hCurrControl, 2
(but I don't know how to match the ID towards the corresponding variable in the language file) and also

Code:
WM_MOUSEMOVE()
{
   CurrControl := A_GuiControl
}
(but this does not work with disabled controls or even listviews etc.)

Any hints?

Thank you very much,
alpinestars


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 1st, 2010, 6:20 am 
Offline

Joined: April 8th, 2009, 7:49 pm
Posts: 6074
Location: San Diego, California
:?: http://www.autohotkey.com/forum/topic41480.html

:?: http://de.autohotkey.com/forum/topic3795.html
maybe the last post at the end of page 3 ?
start of page 4 says "yippee"


I found the above using a google search. Perhaps the method will be helpful as well. It is a site search.

http://www.google.com/search?hl=en&q=si ... rt=10&sa=N


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 1st, 2010, 1:02 pm 
Offline

Joined: October 20th, 2009, 6:36 am
Posts: 10
Thank you, but it doesn't help me :-(
I am not a programming expert, but I want to enable language specific tooltips.
Any other ideas?

Thx,
alpinestars


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 1st, 2010, 6:29 pm 
Offline

Joined: April 8th, 2009, 7:49 pm
Posts: 6074
Location: San Diego, California
alpinestars wrote:
Thank you, but it doesn't help me :-(
I am not a programming expert, but I want to enable language specific tooltips.
Any other ideas?

Thx,
alpinestars

Yeah, wake up and look! :shock:
you wrote================================
I tried some methods, one with
Code:
MouseGetPos, , , , hCurrControl, 2
(but I don't know how to match the ID towards the corresponding variable in the language file)
================================
The last post in the first link I gave you has a working example.

Look up the "MouseGetPos" comand and see what the "2" means.
The result is a number stored in the variable.

In the example,
Code:
Gui Add, Edit, vMyEdit hwndhMyEdit
   %hMyEdit%_TT := "MyEdit tooltip"

the "gui,add" line get the same type of number
The next line retrieves the number from a variable and uses it, along with "_TT" to form the name of another variable.
And then stores text in the new variable.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: chaosad, jrav, MSN [Bot] and 24 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