OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-10-2012, 02:35
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Post Watermarks

Hi,

Do you know how to display a watermark in the script.

For example, if the action is great script that appears for 3 seconds, the message "Script author: John Wayne. Call 31 000 00 00"
or maybe some form with this info?


How do I show and then automatically hide the string after 3 seconds?

Thanks for your help.
Regards.

PS I need a code for the Corel 12 version.
Reply With Quote
  #2  
Old 02-10-2012, 02:40
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,777
Blog Entries: 10
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Message

How do you want the message to display? Is it a dialog, or just a text label on the dialog of your macro?

-Shelby
Reply With Quote
  #3  
Old 02-10-2012, 02:43
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Default whatermark

Only text label. Info about author and phone number.

Thx for reply.

Something like this:



Last edited by grzjanik; 02-10-2012 at 02:51.
Reply With Quote
  #4  
Old 02-10-2012, 06:14
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Post watermark

or small form like this:


Can you help me?

Regards.
Reply With Quote
  #5  
Old 04-10-2012, 16:31
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Post

Hi.
This can be a useful tool tip or other temporary information.
I just do not know what will be the code when an object appears and disappears after 3 seconds.
Do you have any ideas?
Reply With Quote
  #6  
Old 05-10-2012, 09:43
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
You can save a hidden artistic text shape in the document. It can be a string with a certain number of lines.
A special character for the starting line like "**RR**"
For each info line a different character like "_&@2_" proceeded with the info needed.

Use the DocumentOpen event. Place code to look for an artistic shape that has it's first characters "**RR**". So every time a document is opened, pending you has delay load vba unchecked and the events enabled this shape will be found and used.

If it finds this string in a document it will take the .Text.Story.Characters.All string and parse it for the needed info. Then simply place in a MsgBox.

You can also create a tiny macro that makes and places the hidden shape on a non visible layer. A simple form with text field and a command button.

Or, Maybe you can use document properties for the info storage instead.
~John
Reply With Quote
  #7  
Old 08-10-2012, 16:45
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Post Info

Thank you John for your reply.

I meant more for advice on how to show some information and after 2 seconds to automatically be removed.
Something just like this:
Code:
Sub Info()
ActiveDocument.Unit = cdrMillimeter
ActiveDocument.ReferencePoint = cdrCenter
On Error Resume Next
Dim si As Shape, x As Double, y As Double, txt As Shape, x1 As Double, y1 As Double

'How display this object in center screen not page?

x = ActivePage.SizeWidth / 2 - 50
y = ActivePage.SizeHeight / 2 - 30
Set si = ActiveLayer.CreateRectangle2(x, y, 100, 60)
si.Fill.ApplyUniformFill CreateCMYKColor(0, 0, 0, 100)
si.Outline.SetProperties 0#
si.Transparency.ApplyUniformTransparency (30)
    With si.Next.Transparency
    .AppliedTo = cdrApplyToFillAndOutline
    .MergeMode = cdrMergeMultiply
    End With
x1 = si.SizeWidth / 2
y1 = si.SizeHeight / 2
Set txt = ActivePage.ActiveLayer.CreateArtisticText(x, y, "This is" & vbCr & "very important" & vbCr & "information" & vbCr & "for user.", , , "Arial", 24)
txt.Text.Story.Alignment = cdrCenterAlignment
txt.AlignToPageCenter (cdrAlignHCenter)
txt.AlignToPageCenter (cdrAlignVCenter)
txt.Fill.ApplyUniformFill CreateCMYKColor(0, 0, 0, 0)
txt.Transparency.ApplyUniformTransparency (30)
    With txt.Next.Transparency
    .AppliedTo = cdrApplyToFillAndOutline
    .MergeMode = cdrMergeMultiply
    End With

'How using Timer function in Corel 12 for countdown ex. 2 seconds?
'After this 2 seconds info be deleted.

    'txt.Delete
    'si.Delete
End Sub
Regards.

~GrzJanik
Reply With Quote
  #8  
Old 09-10-2012, 19:45
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

HI
I would use a simple delay function like this.

Code:
Function Wait(sngWaitMax As Single) As Boolean
    Dim sngStartTime As Single
    sngStartTime = Timer
    Do While (Timer - sngStartTime) < sngWaitMax
        DoEvents
    Loop
End Function
You can make a small modeless form appear with all info, and then the form will close after a few seconds.

~John
Reply With Quote
  #9  
Old 11-10-2012, 02:39
grzjanik grzjanik is offline
Member
 
Join Date: Mar 2010
Location: Lodz, Poland
Posts: 86
Send a message via Skype™ to grzjanik
Smile Pausing...

Revelation!

Thanks John.

This is what I needed.
You can pausing the other scripts. Good job.

This is what I had in mind but he did not know how to write.
Yet I'm still learning.
Thank you for your lesson about functions.

Thank you very much.
Best regards.

~GrzJanik
Reply With Quote
  #10  
Old 11-10-2012, 09:08
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Quote:
Originally Posted by grzjanik View Post
Revelation!

Thanks John.

~GrzJanik

Hi GrzJanik.
Glad it helped! Glad you liked the videos too!
~John
Reply With Quote
Reply

Tags
time, watermark


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 17:26.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com