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 

Clipboardmanager

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  

Is it usefull?
Yes
75%
 75%  [ 3 ]
No
25%
 25%  [ 1 ]
Total Votes : 4

Author Message
Sty!a



Joined: 31 Jan 2005
Posts: 65

PostPosted: Tue Feb 08, 2005 4:14 pm    Post subject: Clipboardmanager Reply with quote

This is my new script:
Code:
IniRead, var1, store.ini, Saves, kvar1
IniRead, var2, store.ini, Saves, kvar2
IniRead, var3, store.ini, Saves, kvar3
IniRead, var4, store.ini, Saves, kvar4
IniRead, var5, store.ini, Saves, kvar5
IniRead, var6, store.ini, Saves, kvar6
IniRead, var7, store.ini, Saves, kvar7
IniRead, var8, store.ini, Saves, kvar8
IniRead, var9, store.ini, Saves, kvar9
gui, -caption
Gui, Add, ListBox, vStand x6 y7 w130 h130, Slot1|Slot2|Slot3|Slot4|Slot5|Slot6|Slot7|Slot8|Slot9|
Gui, Add, Button, x146 y7 w100 h30, Show
Gui, Add, Button, x146 y47 w100 h30, Save
Gui, Add, Button, x146 y87 w100 h30, Restore
Gui, Add, Button, x146 y147 w100 h30, Close
Gui, Add, Picture, x16 y147 w110 h90, clipboardmanager.gif
refresh:
Gui, Add, Text, vMyText x146 y187 w100 h50,
Gui, Show, x270 y110 h252 w252,
SetTimer, UpdateContent, 1
return
UpdateContent:
GuiControlGet, Stand
If Stand = Slot1
{
Content = %var1%
}
If Stand = Slot2
{
Content = %var2%
}
If Stand = Slot3
{
Content = %var3%
}
If Stand = Slot4
{
Content = %var4%
}
If Stand = Slot5
{
Content = %var5%
}
If Stand = Slot6
{
Content = %var6%
}
If Stand = Slot7
{
Content = %var7%
}
If Stand = Slot8
{
Content = %var8%
}
If Stand = Slot9
{
Content = %var9%
}
GuiControl,,MyText,%content%
return






ButtonShow:
GuiControlGet, Stand
If Stand = Slot1
{
MsgBox, %var1%
}
If Stand = Slot2
{
MsgBox, %var2%
}
If Stand = Slot3
{
MsgBox, %var3%
}
If Stand = Slot4
{
MsgBox, %var4%
}
If Stand = Slot5
{
MsgBox, %var5%
}
If Stand = Slot6
{
MsgBox, %var6%
}
If Stand = Slot7
{
MsgBox, %var7%
}
If Stand = Slot8
{
MsgBox, %var8%
}
If Stand = Slot9
{
MsgBox, %var9%
}
return







;saves The content
ButtonSave:
GuiControlGet, Stand
If Stand = Slot1
{
var1=%clipboard%
}

If Stand = Slot2
{
var2=%clipboard%
}

If Stand = Slot3
{
var3=%clipboard%
}

If Stand = Slot4
{
var4=%clipboard%
}

If Stand = Slot5
{
var5=%clipboard%
}

If Stand = Slot6
{
var6=%clipboard%
}

If Stand = Slot7
{
var7=%clipboard%
}

If Stand = Slot8
{
var8=%clipboard%
}

If Stand = Slot9
{
var9=%clipboard%
}
return






;restores the content
ButtonRestore:
GuiControlGet, Stand
If Stand = Slot1
{
clipboard=%var1%
}

If Stand = Slot2
{
clipboard=%var2%
}

If Stand = Slot3
{
clipboard=%var3%
}

If Stand = Slot4
{
clipboard=%var4%
}

If Stand = Slot5
{
clipboard=%var5%
}

If Stand = Slot6
{
clipboard=%var6%
}

If Stand = Slot7
{
clipboard=%var7%
}

If Stand = Slot8
{
clipboard=%var8%
}

If Stand = Slot9
{
clipboard=%var9%
}
return


ButtonClose:
IniWrite, %var1%, store.ini, Saves, kvar1
IniWrite, %var2%, store.ini, Saves, kvar2
IniWrite, %var3%, store.ini, Saves, kvar3
IniWrite, %var4%, store.ini, Saves, kvar4
IniWrite, %var5%, store.ini, Saves, kvar5
IniWrite, %var6%, store.ini, Saves, kvar6
IniWrite, %var7%, store.ini, Saves, kvar7
IniWrite, %var8%, store.ini, Saves, kvar8
IniWrite, %var9%, store.ini, Saves, kvar9
ExitApp
return

This is a clipboard manager you can save things from your clipboard to the slots and restore them.(Works only with text)
_________________

Th!s !s STYLE
Back to top
View user's profile Send private message
Jon



Joined: 28 Apr 2004
Posts: 373

PostPosted: Wed Feb 09, 2005 2:10 pm    Post subject: Reply with quote

It looks good.

It's got similar functionality to a clipboard script I made a while ago (pre GUi and menu.)

http://www.autohotkey.com/forum/viewtopic.php?t=320
Back to top
View user's profile Send private message Send e-mail
Sty!a



Joined: 31 Jan 2005
Posts: 65

PostPosted: Wed Feb 09, 2005 2:23 pm    Post subject: Reply with quote

Thx. Very Happy
Yo, you're right i didn't knew that you made one. Mr. Green
_________________

Th!s !s STYLE
Back to top
View user's profile Send private message
Sty!a



Joined: 31 Jan 2005
Posts: 65

PostPosted: Wed Feb 09, 2005 2:26 pm    Post subject: Reply with quote

But i found a bug. Shocked
when you have s.th. in a slot, and you close the script it saved in the ini.
But if it has more the 1 line it's not correctly loaded.
I didn't found a way to fix it. Crying or Very sad
Can sombody fix it??? Smile Very Happy
_________________

Th!s !s STYLE
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Feb 09, 2005 3:59 pm    Post subject: Reply with quote

Darnit. This is way too similar to a script I've been working on for a while now. We gotta set up an AHK patent office. Laughing Don't worry, though, I was going in a different direction with it anyway. Great concept, nice to finally see this covered by AHK.
Back to top
View user's profile Send private message
Sty!a



Joined: 31 Jan 2005
Posts: 65

PostPosted: Thu Feb 10, 2005 1:08 pm    Post subject: Reply with quote

Thx johnny Mr. Green but my f*** bug Evil or Very Mad Evil or Very Mad Evil or Very Mad Evil or Very Mad
_________________

Th!s !s STYLE
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Fri Feb 11, 2005 6:45 pm    Post subject: Reply with quote

Sty!a wrote:
when you have s.th. in a slot, and you close the script it saved in the ini. But if it has more the 1 line it's not correctly loaded.
I haven't worked with ini files much, but it looks like you have to translate `r`n to some special characters to preserve them when writing to an ini. For example:

StringReplace, var1, var1, `r`n, ``n, All ; Do this prior to IniWrite.
StringReplace, var1, var1, ``n, `r`n, All ; Do this after IniRead.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions 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