2008-01-01から1年間の記事一覧

イラストレーター テキストをセンタリング

Dim tItem As Illustrator.TextArtItem Dim tRange As Illustrator.TextRange For Each tItem In IllDoc.Selection tRange = tItem.TextRange tRange.Paragraphs(1).Justification = AiJustification.aiCenter Next

イラストレーター ドキュメントを開いて基準座標を合わせる

Dim PoArray() As Integer = New Integer(1) {0, 0} '基準座標用 IllDoc = IllApp.Open(docFileName) '処理するファイルを開 IllDoc.RulerOrigin = PoArray '基準座標を左下に合わせる

Photoshop 7.0 Scripting plug-in

http://codezine.jp/a/article/aid/406.aspx http://www.adobe.com/support/downloads/detail.jsp?ftpID=1536 http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=1536&fileID=1470

TOOLのあるディレクトリを指定

'このTOOLのあるディレクトリを指定 Shared Function GetAppPath() As String Return System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) End Function または DBPath = System.Windows.Forms.Application.Start…

アプリケーションディレクトリを取得する

'アプリケーションディレクトリを取得する Dim strWorkPath As String = System.Reflection.Assembly.GetExecutingAssembly.Location Dim myFileInfo As New System.IO.FileInfo(strWorkPath) MjstrPath = myFileInfo.DirectoryName

イラストレーター SaveOptions オマケ付き

Dim NewPath As String Sub CreateDir() NewPath = Path.GetDirectoryName(Fs(0)) & "\New_" & Format(Now, "yyyyMMdd-HHmmss") & "\" Directory.CreateDirectory(NewPath) End Sub Sub main() Dim SavePath As String = NewPath & Path.GetFileName(FilePat…

WebBrowser を使ってみよう−リンク先を表示

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click WebBrowser1.Navigate(TextBox1.Text) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) H…

イラストレーター 黄色の塗りがあるかどうか調べる

Dim Yellow As Integer Try Yellow = pItem.FillColor.CMYK.Yellow Catch ex As Exception Yellow = 0 End Try

テーブルの削除

SQL

SQLCm.CommandText = "DELETE FROM TEXTPOINT" SQLCm.ExecuteNonQuery()

データベースからデータを取得

SQL

Dim TS As OleDbCommand = Cn.CreateCommand TS.CommandText = "SELECT * FROM TEXTPOINT" Dim tRead As OleDb.OleDbDataReader = TS.ExecuteReader While tRead.Read Tcx = tRead("center_x") Tcy = tRead("center_y") End While

データベースにデータを追加

SQL

Dim Cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\mdb_test\ITEMS.mdb") Dim SQLCm As OleDbCommand = Cn.CreateCommand If Cn.State = ConnectionState.Closed Then Cn.Open() SQLCm.CommandText = "INSERT INTO TEXTPOINT…

イラストレーター 塗りの色を取得

Console.WriteLine(pItem.FillColor.CMYK.Yellow) 結果:25

フィールドのデータ型

SQL

定数値説明 adBoolean 11 ブール値型 adCurrency 6 通貨型。 adDate 7 日付時刻型。 adDouble 5 倍精度浮動小数点数型。 adGUID 72 オートナンバー型。 adInteger 3 長整数型。 adLongVarWChar 203 メモ型。 adSingle 4 単精度浮動小数点数型。 adSmallInt 2…

vb.net SQL 接続されているか判別

SQL

Imports System.Data.OleDb Dim Cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\DB\PATHDB.mdb") If Cn.State = ConnectionState.Closed Then Cn.Open()

keyの最終値を取得

SQL

ALPCm.CommandText = "SELECT MAX(key) FROM POINTALL " Try key = ALPCm.ExecuteScalar Catch ex As Exception key = 0 End Try

イラストレーター パスを新規作成

Dim NewPath As PathItem Dim lines() As Object ReDim lines(0) Dim i As Short For i = 0 To 10 ReDim Preserve lines(i) 'LineList(i) = New Object() {x(i), y(i)} lines(i) = New Object() {i ^ 3 + 100, i ^ 2 + 200} '↑vb.netで配列の配列をVariant A…

イラストレーター 基準座標を左下に合わせる

Dim PoArray() As Integer = New Integer(1) {0, 0} '基準座標用 IllDoc.RulerOrigin = PoArray '基準座標を左下に合わせる

リストFLにファイルを取得--とりあえず完成? コンソールアプリケーションで使用

'リストFLにファイルを取得---------------------------------------------------- Dim FL As New List(Of String) Public Sub ContAdd(ByVal FName As String) '重複のしないようにリストに追加 If FL.Contains(FName) = False Then FL.Add(FName) End If E…

アプリケーションを起動してアイドルになるまで待機

If Process.GetProcessesByName("Illustrator").Length = 0 Then Dim hProcess As System.Diagnostics.Process = System.Diagnostics.Process.Start("Illustrator") hProcess.WaitForInputIdle() ' アイドル状態になるまで待機する 'MsgBox("イラストレータ…

テンポラリフォルダを作る

Imports System.IO Dim temDir As String = Path.GetTempPath & "\myTmp\" Directory.CreateDirectory(temDir) '〜処理〜 Directory.Delete(temDir, True)’ディレクトリを消さないと残ってしまう

フォルダを新しく作成

'処理したいファイルを別ディレクトリにコピーするためのフォルダを新しく作成します Dim SaveDocDir As String = Path.GetDirectoryName(Fp(0)) & "\png_" & Format(Now(), "yyyyMMddHHmmss") & "\" MkDir(SaveDocDir)

イラストレーターからPDFにする時のSaveOption Functionの場合

Private Function getPDFSaveOptions() As PDFSaveOptions Dim options As PDFSaveOptions = New PDFSaveOptionsClass With options options.Compatibility = AiPDFCompatibility.aiAcrobat4 options.EmbedAllFonts = False options.GenerateThumbnails = Fa…

イラストレーターからPDFにする時のSaveOption

'PDFSaveOptionを設定する Dim PDFSaveOption As New PDFSaveOptions With PDFSaveOption .PreserveEditability = False .Compatibility = AiPDFCompatibility.aiAcrobat4 .EmbedAllFonts = False .GenerateThumbnails = False End With

イラストレーターのアクションを使う

Imports System.Threading Label1.Text = "70%縮小しています" Me.Refresh() If CheckBox1.Checked = True Then Try IllApp.DoScript("Reduction70", "VB60") While IllApp.ActionIsRunning = True Thread.Sleep(100) End While Catch ex As Exception MsgBo…

イラストレーターのドキュメントを閉じる時のオプション

IllDoc.Close(AiSaveOptions.aiDoNotSaveChanges)

イラストレーターがバックグラウンドで起動していたら閉じる

If Not Illapp.Visible Then Illapp.Quit() If Not Illapp Is Nothing Then System.Runtime.InteropServices.Marshal.ReleaseComObject(Illapp) End If

DragDrop 拡張子のないファイルもOK

Dim Fs As New List(Of String) Private Sub Form1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter If e.Data.GetDataPresent(DataFormats.FileDrop) Then 'コントロール内にドラッグされたとき実…

拡張子を限定、有るか無いかも判別してListに追加

Dim FL As New List(Of String) 'リストを作成 Public Sub ContAdd(ByVal FName As String) '重複のしないようにリストに追加 If FL.Contains(FName) = False Then FL.Add(FName) End If End Sub Public Function ExteJudge(ByVal FN As String) As Boolean …

vb.net で word をpdfに・・・したいなぁ

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim FilePath As String Dim WA As New Word.Application Dim WF As Word.Document FilePath = "G:\a001.doc" WF = WA.Documents.Open(FileP…

印刷

’通常使うプリンタで印刷 Dim proc As New Process Dim FilePath As String = "G:\b001.doc" proc.StartInfo.FileName = filePath proc.StartInfo.Verb = "Print" proc.StartInfo.CreateNoWindow = True proc.Start() proc.WaitForExit(20000) 'プロセスが終…