AutoHotkey Community

It is currently May 27th, 2012, 6:37 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 159 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11  Next
Author Message
 Post subject:
PostPosted: June 18th, 2010, 10:07 am 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
mkny wrote:
last key pressed highlights in red correctly, but the symbol of the key underneath temporarily shows the key that was pressed one key before that
I can confirm this on Win7 64bit. Don't know why yet.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
PostPosted: June 20th, 2010, 4:14 pm 
Offline

Joined: February 7th, 2010, 11:02 pm
Posts: 9
Location: Wisconsin
I am trying to create a keyword that is onscreen but without all the buttons. Actually want to make a controller with customize buttons.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 20th, 2010, 7:45 pm 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
yehster wrote:
I think I fixed to problem
You did indeed. It would not show up if there were any other function keys after the ones that use the keyPhrase (they would alter the 'keyf' var to be whatever the func was for the last key that was created.) In your layout, that does not happen and the bug rears its ugly head. Well, not any more. you killed it. I have added code to my source in the kb_gui.ahk file to take care of this. I had code to clear that var after the key was clicked, but not after the keys were created. Thanks! I will update soon.


tacman132 wrote:
without all the buttons
Without any buttons, you will not be able to control anything! Do you mean, only a few buttons and not a standard keyboard layout? That is possible. What are you trying to accomplish?

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 20th, 2010, 8:10 pm 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
I have fixed the "penultimate key pressed shows up" issue. It was not actually a bug with the program, but with how the picture control retains the image it had (I use a picture control with an image with a red border and transparent interior. In Win7, the picture control seems to retain the contents that were last there in the transparent area- as if it were part of the image- hence the previous key showing up. This did not happen in XP. Go figure.) I will upload the latest version soon.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
PostPosted: June 21st, 2010, 11:58 pm 
Offline

Joined: February 7th, 2010, 11:02 pm
Posts: 9
Location: Wisconsin
Yes only a few of the buttons. I just mean they wouldn't say the letters of the keyboard. And there wouldn't be as many.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 22nd, 2010, 3:01 am 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
A layout like this might get you started. HTH

Code:
<language name="English-US">
   <traymenu>
      <command value="show">Show</command>
      <command value="hide">Hide</command>
      <command value="settings">Settings</command>
      <command value="fastStrings">FastStrings</command>
      <command value="hotStrings">HotStrings</command>
      <command value="about">About</command>
      <command value="exit">Exit</command>
   </traymenu>
   <layout margin="22 5 6 5" basekeyheight="21" basekeywidth="27" keyspacing="5" spacebeforesinglechars="1" rounded="0" backcolor="0x7C85DD" transparentcolor="0x7C85DD">
      <font size="7" justify="left" color="0x96CBCB">Arial</font>
      <blob color="0x7B85DD" x="20" y="6" width="110" height="*" options="R20-20">top blob</blob>
      <blob color="0xB0B0FF" x="1" y="16" width="*" height="*" options="R20-20" trimColor="0x7B85DD" trimWidth="2" trimHeight="2" trimDrawFirst="1">bottom left blob</blob>
      <header x="-5" y="-22" height="19" width="*" transparent="1">
         <image x="+0" y="-3" width="32" height="32" dragger="1">Keyboard2.ico</image>
         <text x="+34" y="+6" color="0x4D4D4D" dragger="1">AHKOSK by Micahs</text>
      </header>
      <row y="+3">
         <key function="KeyDock" font="wingdings 3" size="+1">R</key>
         <key function="KeyPhrase" phrase="Hello, how are you?">Hello</key>
         <key function="KeyPhrase" phrase="Goodbye, see you later!">Goodbye</key>
         <key function="KeyPhrase" phrase="Greetings, program!">Greetings</key>
         <key function="KeyPhrase" phrase="Sending some text.">Click</key>
      </row>
      <row>
         <key function="KeyPhrase" phrase="Sending some text.">Click</key>
         <key function="KeyPhrase" phrase="Sending some text.">Click</key>
         <key function="KeyPhrase" phrase="Sending some text.">Click</key>
         <key function="KeyPhrase" phrase="Sending some text.">Click</key>
         <key function="KeyPhrase" phrase="Sending some text.">Click</key>
      </row>
   </layout>
</language>

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 22nd, 2010, 5:53 am 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
I've uploaded a new version in the first post.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: faststrings
PostPosted: April 12th, 2011, 11:45 pm 
Thanks for this great script!

I would like to load different "faststring" texts depending on key press ie:
press key One and load fastrings1.txt
press key Two and load faststrings2.txt

I will appreciate any help.

tx


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 13th, 2011, 1:01 am 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
@maxximon

Add this to, well, anywhere. Call it with a relative or absolute filepath\name. If relative, the file must be in the same folder as the ahk files. You can call it with "res\newFastString.txt" or similar if you put the new file in the res folder with the other one. You get the idea.

After calling "setFastString" the changes will take effect after you next summon the FastString gui.

HTH,
micahs

Code:
/*
The newFile FastString file should be formatted with one FastString per line. (Obviously, to change this, use a different delimiter than `n. Possibly "|" itself. I just figured that one per line was easy to edit and add entries...)
*/
setFastString( newFile )
{
   global fastStringsVar
   If FileExist( newFile )
   {   FileRead, fsv, %newFile%
      StringReplace, fastStringsVar, fsv, `n, |, All   ;replace all with "|" so listbox will display correctly
   }
}

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: still don't get it
PostPosted: April 13th, 2011, 5:55 am 
micahs, thank you so much for your prompt response. I need to clarify your instructions:
Do I create a faststring file newFile.txt in /res and create a file setFastString.ahk w/ your new code and also place it in /res?
To call it I inserted the following code in the n the LOLWUT.xml file.
"
<row>
<key function="KeyFastString" font="webdings" size="+3">~</key>
<key function="setFastString" font="webdings" size="+3">~</key>..."

If that is the case, although I find it unlikely, it does not work. I also tried placing setFastString.ahk (your new graciously provide code) into the root dir with AHKOSK.exe and still "no cigar".


Tx again,

max


Report this post
Top
  
Reply with quote  
 Post subject: still don't get it
PostPosted: April 13th, 2011, 6:18 am 
I apologize for my ignorance. I now recognize the function you created should go somewhere in the /layout LOLWUT.xml :
<row>
<key function="KeyFastString" font="webdings" size="+3">~</key>
<key function="setFastString" >X</key>

</row>
</layout>
</language>
/*
The newFile FastString file should be formatted with one FastString per line. (Obviously, to change this, use a different delimiter than `n. Possibly "|" itself. I just figured that one per line was easy to edit and add entries...)
*/
setFastString("res\newFile.txt") rem--- I tried w/ and w/o quotes"
{
global fastStringsVar
If FileExist( res\"newFile.txt" )
{ FileRead, fsv, %newFile%
StringReplace, fastStringsVar, fsv, `n, |, All ;replace all with "|" so listbox will display correctly
}
}
I placed newFile.txt w/ the correct formating in /res

Still does not work for me. Sorry for the inconvenience.

max


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 13th, 2011, 6:25 am 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
Sorry, my explanation was not very clear. I assumed more familiarity with AHK. I am writing this into the main code and will post it when it's complete. I'll include an example xml file for you to see just how it will work.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 13th, 2011, 7:08 am 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
All right. There is a new version uploaded with this fully implemented. Check the first post.

The new xml example file is "english-fancy-maxximon.xml" and you'll want to look at lines 24 and 25 to see how they are handled. There are two new faststring files in the res folder. Add your faststrings there. The default one is still "kb_fastStrings.txt" but you can change the faststring entries by clicking on the fs1 and fs2 buttons. You can point the source attribute of one of the fs buttons to "res\kb_fastStrings.txt" to switch between the default and an alternate faststring file.

Wow! It's been a long time since I messed with this code. I've wanted to do more but haven't had the time. Maybe I'll move this higher up the list...

Anyway, HTH.
micahs

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 13th, 2011, 7:40 am 
Offline

Joined: March 7th, 2011, 2:59 am
Posts: 151
Image I downloaded the Zip file. Should I put all the .ahk files in the same folder and then click on the kb_main.ahk? Will that work? Image


Image :lol:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 13th, 2011, 8:39 am 
Offline

Joined: December 1st, 2006, 9:27 am
Posts: 460
Hi bruno!

You can just extract the zip and click the kb_main.ahk file. This will work only if you ave AHK installed, though. If not, you can drag`Ndrop the .ahk file over autohotkey.exe to run it. (I think this works.) Otherwise, you can use an ahk editor. I've got a portable, modified SciTE for AHK and fincs has one called SciTE4AHK, too.

HTH
micahs

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 159 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo and 22 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