AutoHotkey Community

It is currently May 25th, 2012, 11:50 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 

Is it usefull?
Yes
No
You may select 1 option

View results
Author Message
 Post subject: Clipboardmanager
PostPosted: February 8th, 2005, 5:14 pm 
Offline

Joined: January 31st, 2005, 4:11 pm
Posts: 65
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)

_________________
Image
Th!s !s STYLE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2005, 3:10 pm 
Offline

Joined: April 28th, 2004, 1:12 pm
Posts: 349
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/viewtop ... highlight=


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2005, 3:23 pm 
Offline

Joined: January 31st, 2005, 4:11 pm
Posts: 65
Thx. :D
Yo, you're right i didn't knew that you made one. :mrgreen:

_________________
Image
Th!s !s STYLE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2005, 3:26 pm 
Offline

Joined: January 31st, 2005, 4:11 pm
Posts: 65
But i found a bug. :shock:
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. :cry:
Can sombody fix it??? :) :D

_________________
Image
Th!s !s STYLE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2005, 4:59 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
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. :lol: Don't worry, though, I was going in a different direction with it anyway. Great concept, nice to finally see this covered by AHK.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2005, 2:08 pm 
Offline

Joined: January 31st, 2005, 4:11 pm
Posts: 65
Thx johnny :mrgreen: but my f*** bug :evil: :evil: :evil: :evil:

_________________
Image
Th!s !s STYLE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 11th, 2005, 7:45 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: JamixZol, Rajat, stevep, Yahoo [Bot] and 15 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