Skip to main content

Search

Search

Some Small Questions

Comments

4 comments

  • Avatar
    Shotaro Ito
    Hi Tomasz,

    1. Do not minimize BarTender, instead hide BarTender. When Commander run as Application mode, In Detection > BarTender command handler setup, you can select [VisibleWindows] property. When you set [VisibleWindows] to "Interactive Dialogs(Main window hidden)", BarTender's user prompt dialog shown even Commander is minimized.
    (Detection need to be stopped to open command handler setup.)

    2. There's no way to change print button size in print dialog or user prompt dialog. One (a bit sad) workaround is - lower screen resolution, or make text size bigger on windows setting.

    3. BarTender's title on taskbar shows active format's filename, and there's no way to change that from VBScript, as Format.Title property is read-only.

    4. Since BarTender's database connection is read only, you need to create connection by yourself in VBScript.
    Create a Excel sheet "book1.xls" with columns Field1,Field2,Field3, then place the same folder as the btw file.
    in btw file, create 3 named substrings "FIELD1","FIELD2","FIELD3".
    Place code below in "OnPrintEnd" event control script.
    [code]
    'Place script below at to
    If Format.IsPrinting = False then Exit sub

    Dim objCon
    Dim strSQL

    Set objCon = CreateObject("ADODB.Connection")
    'Create connection (in the case of xls file in the same folder as btw file)
    objCon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='book1.xls';Extended Properties=""Excel 8.0;HDR=YES;"""
    objCon.Open

    'Create statement
    strSQL = "INSERT INTO [Sheet1$] (Field1,Field2,Field3) values ('"
    strSQL = strSQL & FIELD1 &"','"
    strSQL = strSQL & FIELD2 &"','"
    strSQL = strSQL & FIELD3 & "')"
    'msgbox strSQL

    'Run SQL
    objCon.Execute strSQL

    'Close connection
    objCon.Close
    Set objCon = Nothing
    [/code]

    Hope that helps!
    0
  • Avatar
    Legacy Poster
    Thank's for answer

    1. I try make this and see whats happed... Now I set all windows if i good remember... :rolleyes:

    2 and 3 You worry me :/ In Poland always customer finding something to renegotiations ... But we see... :unsure:

    4.Ok I try... Now i make select and update from query in database settings and next do Trigger and scheduled agent i don't know how but is worked B)

    But Client some additional invented too verification and i make some insert and more... How is go this way we make system to traceability with magazine worked on bartender ;) But i have hole in VBScript :blink:




    0
  • Avatar
    Legacy Poster
    Awesome. I just tried writing my prompted values to an Excel file. This is something that's been requested of us before, and the ability to do it provides of lot of added funtionality and sellability to BarTender. Thanks.
    0
  • Avatar
    Legacy Poster
    Great friend really Awesome, Answers are really nice, great replay all answers are right..
    0

Please sign in to leave a comment.