JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for OATS-SIG Archives


OATS-SIG Archives

OATS-SIG Archives


OATS-SIG@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

OATS-SIG Home

OATS-SIG Home

OATS-SIG  May 2007

OATS-SIG May 2007

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

RE: [oats-sig] Dasher for programmers.

From:

"Simon Judge" <[log in to unmask]>

Reply-To:

OATs Project Special Interest Group <[log in to unmask]>

Date:

Tue, 29 May 2007 09:20:13 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (167 lines)

This thread has some interesting options:

http://www.autohotkey.com/forum/viewtopic.php?t=4402 

No personal experience of these tools on Linux though so maybe Steve/Heinrik
would know the best tool? 


Cheers.
 
Simon

-----Original Message-----
From: [log in to unmask]
[mailto:[log in to unmask]] On Behalf Of Andre
Sent: Monday, May 28, 2007 5:10 PM
To: OATs Project Special Interest Group
Subject: Re: [oats-sig] Dasher for programmers.


Any idea how I could do the same on Linux?

Andre wrote:
> I spent the last three days programming in C using Dasher, and what 
> made my life much easier was a program named AutoHotKey [1]. I wrote a 
> small script for it that allows me to easily and quickly enter and 
> exit the Dasher window without having to use the mouse or pressing many
keys.
> 
> Basically, you press F12 to open the Dasher window, type whatever you 
> need in it, and then press F12 again to go back to the original 
> window, and have all the text you typed in Dasher entered into that 
> original window. Note that I don't have to start or stop Dasher 
> manually, I just press F12, mouse, and F12 again.
> 
> The result was that I was always in my editor window (VIM) and only in 
> Dasher when actually typing (Dashering)! :-)
> 
> To use this script: install AutoHotKey, copy the script into a file 
> with the extension .ahk and double click it. In Dasher, the option 
> "Start on space bar" must be enabled.
> 
> The script:
> 
> ; Tested with Dasher 4.2.2 and AutoHotKey 1.0.46.01.
> ; Set "Start on space bar".
> 
> F12::
> #WinActivateForce
> SetDefaultMouseSpeed, 0
> if on = 1
> {
>     on = 0
>     IfWinExist, ahk_class DASHER
>     {
>         IfWinNotActive
>         {
>             WinActivate
>             WinWaitActive
>         }
> 
>         ; Copy the text typed in Dasher to the clipboard, stop Dasher 
> and minimize its
>         ; window.
>         clipboard =
>         SendInput, {F5}
>         SendInput, ^n ;[1]
>         WinMinimize
> 
>         ; If the original window still exists, then bring it to the 
> front and paste
>         ; the Dashered text into it.
>         IfWinExist, ahk_id %old_winid%
>         {
>             WinActivate
>             WinWaitActive
>             ; Ways for pasting:
>             ;  Middle click
>             ;MouseMove, old_x, old_y
>             ;MouseClick, middle
>             ;  Control-V
>             ;SendInput, ^v
>             ;  Typing the characters.
>             text := RegExReplace(clipboard, "\r\n", "`n")
>             SendInput, {Raw}%text%
> 
>             ; Uncomment if you want to restore the original cursor 
> position.
>             ;MouseMove, old_x, old_y
>         }
>         Else
>         {
>             MsgBox, I can't find the original window. The text you 
> typed is in the clipboard.
>         }
>     }
> }
> else
> {
>     ; If the "save changes?" window is open, choose no.
>     IfWinExist, Unsaved changes
>     {
>         ControlClick, &No,,,,, NA
>     }
> 
>     IfWinExist, ahk_class DASHER
>     {
>         IfWinActive
>         {
>             MsgBox, Go to the window you'd like to type in and press 
> the hotkey again.
>             return
>         }
> 
>         on = 1
> 
>         ; Remember the cursor position and the front window.
>         MouseGetPos, old_x, old_y, old_winid
> 
>         ; Maximize Dasher and bring it to the front.
>         WinMaximize
>         WinActivate
>         WinWaitActive
> 
>         ; Position the cursor on the center of the Dasher input area.
>         ControlGetPos, x, y, w, h, CANVAS1
>         MouseMove, (x + w / 2 + 29), (y + h / 2)
> 
>         ; Dasher >= 4 : sets Dasher speed to the configured value. The 
> first ^n at [1]
>         ; will have Dasher's actual speed half of that configured.
>         SendInput, ^n
> 
>         ; Start Dasher.
>         ControlFocus, CANVAS1
>         SendInput, {Space}
>     }
>     Else
>     {
>         MsgBox, You must run Dasher manually.
>     }
> }
> return
> 
> --
> 
> [1] http://www.autohotkey.com/




**********************************************************************
This message  may  contain  confidential  and  privileged information.
If you are not  the intended  recipient please  accept our  apologies.
Please do not disclose, copy or distribute  information in this e-mail
or take any  action in reliance on its  contents: to do so is strictly
prohibited and may be unlawful. Please inform us that this message has
gone  astray  before  deleting it.  Thank  you for  your co-operation.

NHSmail is used daily by over 100,000 staff in the NHS. Over a million
messages  are sent every day by the system.  To find  out why more and
more NHS personnel are  switching to  this NHS  Connecting  for Health
system please visit www.connectingforhealth.nhs.uk/nhsmail
**********************************************************************


Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

October 2019
July 2019
October 2016
March 2016
February 2016
May 2015
February 2015
January 2015
December 2014
November 2014
May 2014
April 2014
March 2014
February 2014
November 2013
October 2013
June 2013
May 2013
July 2012
June 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager