OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old 20-02-2010, 11:44
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Looks like your on the right track.

Just make sure your get and save settings match exactly. Example "width" and Width" would be different.

txtWidth.value is the name of the text field box. You will need separate save and get's for each field you want saved.


Hope this helps.
-John
Reply With Quote
  #12  
Old 20-02-2010, 14:05
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default

Okay. I'll check my code and make sure the names are exact.

This is fun stuff. Now, if only I could get those passwords for the protected macros, I could make changes that I want them and I'll have a perfect tool that I can share with my colleagues.

Thanks for all your help. This has opened new doors for me!
Reply With Quote
  #13  
Old 20-02-2010, 17:34
gorgo gorgo is offline
Senior Member
 
Join Date: Feb 2010
Posts: 169
Default

Alright. Here is the code. I checked it and it looks right...

save setting:
Code:
Private Sub cmOK_Click()
    Dim col As Collection
    Dim sFolder As String
    Dim sMask As String
    
    cfg.Resolution = cResolution.GetValue()
    SplitMask txtSource.Text, sFolder, sMask
    Set col = FindFiles(sFolder, sMask)
    If col.Count Then
        ImportAllFiles sFolder, col
        Unload Me
    Else
        MsgBox "No files found matching the specified mask", vbCritical
    End If
    SaveSetting "Thumbnailer", "txtWidth", "Width", txtWidth.Value
    SaveSetting "Thumbnailer", "txtHeight", "Height", txtHeight.Value
    SaveSetting "Thumbnailer", "txtHSpacing", "Horizontal", txtHSpacing.Value
    SaveSetting "Thumbnailer", "txtVSpacing", "Vertical", txtVSpacing.Value

End Sub
get setting:
Code:
Private Sub UserForm_Initialize()
    txtWidth.Value = GetSetting("Thumbnailer", "txtWidth", "Width", 0.5)
    txtHeight.Value = GetSetting("Thumbnailer", "txtHeight", "Height", 0.5)
    txtHSpacing.Value = GetSetting("Thumbnailer", "txtHSpacing", "Horizontal", 0.5)
    txtVSpacing.Value = GetSetting("Thumbnailer", "txtVSpacing", "Vertical", 0.5)
    
    bProcessing = False
    Set cUnitBox = New clsUnitListBox
    cUnitBox.Init cbUnits, cfg.Unit
    
    Set cWidth = New clsUnitSpin
    cWidth.Init txtWidth, spnWidth, cfg.Width, 1, cUnitBox, lblWidthUnit, lblWidth, 0.1
    
    Set cHeight = New clsUnitSpin
    cHeight.Init txtHeight, spnHeight, cfg.Height, 1, cUnitBox, lblHeightUnit, lblHeight, 0.1

    Set cHSpacing = New clsUnitSpin
    cHSpacing.Init txtHSpacing, spnHSpacing, cfg.HSpacing, 1, cUnitBox, lblHSpacingUnit, lblHSpacing, 0
    
    Set cVSpacing = New clsUnitSpin
    cVSpacing.Init txtVSpacing, spnVSpacing, cfg.VSpacing, 1, cUnitBox, lblVSpacingUnit, lblVSpacing, 0

    Set cHMargin = New clsUnitSpin
    cHMargin.Init txtHMargin, spnHMargin, cfg.HMargin, 1, cUnitBox, lblHMarginUnit, lblHMargin, 0
    
    Set cVMargin = New clsUnitSpin
    cVMargin.Init txtVMargin, spnVMargin, cfg.VMargin, 1, cUnitBox, lblVMarginUnit, lblVMargin, 0
    
    Set cResolution = New clsIntSpin
    cResolution.Init txtResolution, spnResolution, cfg.Resolution, lblResolution, 36
    
    Set cFileType = New clsComboBox
    cFileType.Init cbFileType, 0, Array("Bitmaps (*.cpt;*.jpg;*.bmp;*.gif;*.tif*;*.jpeg;*.png;*.tga;*.psd;*.jp2;*.fpx)", _
                    "Vector Files (*.cdr;*.des;*.cmx;*.eps;*.ps;*.ai;*.wpg;*.wmf;*.emf;*.cgm;*.svg;*.dxf;*.dwg)", _
                    "CorelDRAW Files (*.cdr;*.des;*.cmx)", _
                    "All Files (*.*)")
                    
    cFileType_Change
    
    Set cColorMode = New clsComboBox
    cColorMode.Init cbColorMode, cfg.ColorMode, "Grayscale,RGB,CMYK", lblColorMode
    
    cSubFolders.Value = IIf(cfg.SubFolders, 1, 0)
    cSubFolders_Click
    
    cFolderCaptions.Value = IIf(cfg.FolderCaption, 1, 0)
    cRasterizeBefore.Value = IIf(cfg.RasterizeBefore, 1, 0)

    cRasterize.Value = IIf(cfg.Rasterize, 1, 0)
    cRasterize_Click
    
    cAddFileName.Value = IIf(cfg.AddCaption, 1, 0)
    cAddFileName_Click
    
    cAddFrame.Value = IIf(cfg.AddFrame, 1, 0)
    UpdateLayout
End Sub
Reply With Quote
  #14  
Old 20-02-2010, 20:49
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
Try moving the get's in the userform_int to the bottom right under where it says "UpdateLayout"

-John
Reply With Quote
  #15  
Old 20-02-2010, 21:07
gorgo gorgo is offline
Senior Member
 
Join Date: Feb 2010
Posts: 169
Default

OUTSTANDING!!!!
That did the trick.
Thanks You John!

Last edited by gorgo; 20-02-2010 at 21:22.
Reply With Quote
Reply


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 06:51.


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