AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Variable to Clipboard

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
jmsssm



Joined: 19 Mar 2008
Posts: 6

PostPosted: Wed Mar 19, 2008 6:24 pm    Post subject: Variable to Clipboard Reply with quote

Code:
^k::

Send {Home}
Send JMM -{Space}
Send ^s
Send ^r
Sleep 2500
Send ^a
Sleep 500
Send ^c
Sleep 500
Send {Left}
z := clipboard

w := clipboard

x := clipboard

StringGetPos y, x, From:
StringTrimLeft mai, x, %y%
ClipBoard = %mai%
MsgBox MAIL = %mai%




Loop,Parse, w ,`n
{
 
  StringGetPos,Occurence,A_LoopField,Subject:
  If ErrorLevel <> 0
  Continue
  StringMid subj, A_LoopField, 16
  StringTrimRight, subj2, Subj, 1
  Clipboard=%subj2%
  Break
}



StringGetPos, e, z, ]
StringGetPos, f, z , mailto:
f := f + 8
g := e - f + 1
StringMid, h, z, %f%, %g%
Sleep, 500
If InStr(h, "/")
{
                       StringGetPos, var1, h, /
                       StringMid, h, h, 1, 7
}                       

Clipboard = %h%
msgbox Done!
return




Hi I've made this code just to retrieve information from Outlook (replyed or forwarded) email.

Cannot understand why just clipboard doesn't change to variable %mai%

When I do msgbox %mai% it shows exactly what I want....

Anyone?

Please sorry for my english it's not my first language.

Thanks
Back to top
View user's profile Send private message
jmsssm



Joined: 19 Mar 2008
Posts: 6

PostPosted: Wed Mar 19, 2008 6:44 pm    Post subject: Reply with quote

The others:

Clipboard = %subj2%

Clipboard = %h%

works well...

Confused
Back to top
View user's profile Send private message
HugoV



Joined: 27 May 2007
Posts: 650

PostPosted: Wed Mar 19, 2008 7:13 pm    Post subject: Reply with quote

Are you sure?
Code:
ClipBoard = %mai%
MsgBox Clipboard = %Clipboard%
MsgBox MAIL = %mai%
could you add a MsgBox above the other one
that displays the clipboard, what does it say?[/code]
Back to top
View user's profile Send private message
jmsssm



Joined: 19 Mar 2008
Posts: 6

PostPosted: Wed Mar 19, 2008 7:27 pm    Post subject: Reply with quote

Done that!

Displays correctly but doesn't save to clipboard.

I use Flashpaste as clipboard manager.

Note: The others clipboard = ..... are saved successfully in flashpaste that one no.

:S

thanks again
Back to top
View user's profile Send private message
HugoV



Joined: 27 May 2007
Posts: 650

PostPosted: Wed Mar 19, 2008 7:35 pm    Post subject: Reply with quote

What if you use
Code:
Clipboard:= mai

Also check ClipWait
http://www.autohotkey.com/docs/commands/ClipWait.htm

Edit: I don't know flashpaste, but I find CLCL to be very good
http://www.nakka.com/soft/clcl/index_eng.html
(and I've tried many and CLCL is freeware too)
Back to top
View user's profile Send private message
jmsssm



Joined: 19 Mar 2008
Posts: 6

PostPosted: Thu Mar 20, 2008 3:00 pm    Post subject: Reply with quote

It's OK now.

I changed to CLCL and it works!

My first script is working!

Very Happy

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group