AutoHotkey Community

It is currently May 27th, 2012, 12:19 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: December 1st, 2009, 3:11 pm 
Offline

Joined: April 9th, 2009, 4:11 pm
Posts: 22
Location: Houston, Tx
hugoV,

I was premature with thinking the Clipboard method was going to work.
It's not.

When I was testing it yesterday, I was only testing it in my text editor and was working fine. Now that I've moved over to the apps where I use the hotstrings, it's not pasting the textstrings - at all.

When it does paste, it sometimes is pasting whatever it sees as the last thing on the clipboard. Just went from usable to not working.
What is going on?

Here is the actual coding I incorporated from yours:
Code:
#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.
;setkeydelay, -1

; #=Win ^=Ctrl +=Shift !=Alt

!c:: ;Inserts Contact Log info
ClipboardSave:=ClipboardAll
TodayMinus3 := A_Now
TodayMinus6 := A_Now
EnvAdd, TodayMinus3, -3, days
EnvAdd, TodayMinus6, -6, days
FormatTime, TodayMinus3, %TodayMinus3%, M/d/yy
FormatTime, TodayMinus6, %TodayMinus6%, M/d/yy
;MsgBox % TodayMinus3
;MsgBox % TodayMinus6
Clipboard=
(join`n
%TodayMinus3% -dg- reviewed client issues & involvement
Client gave me authority to negotiate.

%TodayMinus6% -dg- em'd client non-participation advisory
%TodayMinus6% -dg- emailed client request for new OIR
%TodayMinus6% -dg- contact attempt w/client`n
)
;MsgBox % Clipboard
;ClipWait, 2
Send ^v
Clipboard := ClipboardSave
ClipboardSave=
Return

;=======================================================
!d::  ;Inserts Supplement date
ClipSaved:=ClipboardAll
FormatTime, DateString,,M/d/yy
Clipboard= %DateString% -dg- report finished and submitted for supplementation.`n
;ClipWait, 2
Send ^v
Clipboard := ClipSaved
ClipSaved =
Return


I tried ClipWait just to see if that would alleviate the Send ^v from pasting existing CB contents. Didn't have any effect, so I disabled.

Even in the text editor, when doing multiple hotstring keyboard actions, the pasting is sporadic. Sometimes it will paste the intended strings and sometimes it will paste the pre-script CB contents.

Your help and guidance is appreciated.

weg


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2009, 3:18 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
Try this, by using clipboard= and clipwait,0 it should really erase all previous clipboard content. You could also use the methods a few posts above to get the active window & control so you can use ControlSend
Code:
#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.
;setkeydelay, -1

; #=Win ^=Ctrl +=Shift !=Alt

!c:: ;Inserts Contact Log info
ClipboardSave:=ClipboardAll
Clipboard= ; clear Clipboard
ClipWait, 0
TodayMinus3 := A_Now
TodayMinus6 := A_Now
EnvAdd, TodayMinus3, -3, days
EnvAdd, TodayMinus6, -6, days
FormatTime, TodayMinus3, %TodayMinus3%, M/d/yy
FormatTime, TodayMinus6, %TodayMinus6%, M/d/yy
;MsgBox % TodayMinus3
;MsgBox % TodayMinus6
Clipboard=
(join`n
%TodayMinus3% -dg- reviewed client issues & involvement
Client gave me authority to negotiate.

%TodayMinus6% -dg- em'd client non-participation advisory
%TodayMinus6% -dg- emailed client request for new OIR
%TodayMinus6% -dg- contact attempt w/client`n
)
;MsgBox % Clipboard
;ClipWait, 2
ClipWait, 0,  ; extra
Sleep, 100 ; extra
Send ^v
Clipboard=
clipwait, 0

Clipboard := ClipboardSave
ClipboardSave=
Return

;=======================================================
!d::  ;Inserts Supplement date
ClipSaved:=ClipboardAll
FormatTime, DateString,,M/d/yy
Clipboard= %DateString% -dg- report finished and submitted for supplementation.`n
;ClipWait, 2
Send ^v
Clipboard := ClipSaved
ClipSaved =
Return
Perhaps your new PC has other software installed that interferes with AutoHotkey, perhaps you could try to look into that as well. It is really hard to help you as you give little information (programs, OS etc etc). I'm sure it is something specific to your computer

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: Leef_me, Pulover, rjgatito, XstatyK and 20 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