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 

del first line of Edit2 ....

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



Joined: 02 Oct 2004
Posts: 74

PostPosted: Tue Apr 26, 2005 6:24 pm    Post subject: del first line of Edit2 .... Reply with quote

hi,
is there a way to delete the first line of Edit2? I want to write a simple script that automates the entering of new Textpad Clip Library entries.
For my format I need to delete the first line.



regards
umek
_________________
Works on my machine!
Back to top
View user's profile Send private message
TeknoMusicMan



Joined: 14 Apr 2005
Posts: 188
Location: Wisconsin, USA

PostPosted: Tue Apr 26, 2005 6:50 pm    Post subject: Reply with quote

you would probably have to ControlGetText from Edit2 then StringGetPos to fine the first `n and then use StringTrimLeft to delete everything upto and including the `n.

Hope those Ideas help ya out
_________________

"Make it idiot-proof, and someone will make a better idiot."
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
umek



Joined: 02 Oct 2004
Posts: 74

PostPosted: Tue Apr 26, 2005 7:53 pm    Post subject: Reply with quote

thx Mr.TeknoMusicMan Smile
... for the impuls, I had my problems but I got it ...

Code:
#Persistent
#SingleInstance

escape::
title = Clip Library Entry
shortcut = !1 ; to paste new entry ...
    Send, ^a
    Sleep, 10
    Send, ^c
    clip = %clipboard%
    Send, %shortcut%
    Sleep, 10
    ControlGetText, contents, Edit2, %title%
    StringGetPos, pos, contents, `n
    pos += 1
    StringTrimLeft, finalContent, contents, %pos%
    ControlSetText, Edit2, %finalContent%, %title%
Exit


greetings
_________________
Works on my machine!
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