機能を加えたいと思っています。
ただし、常駐中もソフトとして動作するようにしたいのですが、
どうすればできるのか教えてください><
下に機能を加えたいプログラムを載せておきます・・・
//パックファイル&実行ファイル名 #epack "logo.bmp" #packopt name "screencapture" //起動ロゴ cls screen 0,,,2 bgscr 2,200,600,0,150,150 title "起動中..." picload "logo.bmp" wait 200 //起動時の画面 *start cls screen 2,ginfo_dispx,ginfo_dispy,2 screen 0,150,100,4 title "メニュー" objsize 150,25 button "通常モード",*start1 button "連写モード",*start2 button "保存画像を見る",*kan stop ;-------------------------------------------------------------------------------------------- //通常モードプログラムここから *start1 cls screen 2,ginfo_dispx,ginfo_dispy,2 screen 0,160,110,4 title "通常モード" mes " Print Screenキー" mes " を押してください" objsize 160,25 pos 0,35:button "モード切替",*start2 button "保存画像を見る",*kan1 //キーに反応するやつ *lp1 await 1 getkey k,44 if k=1:goto,*program1 goto *lp1 //メインプログラム *program1 #uselib "user32.dll" #func global OpenClipboard "OpenClipboard" int #cfunc global GetClipboardData "GetClipboardData" int #func global CloseClipboard "CloseClipboard" #uselib "gdi32.dll" #func global CreateCompatibleDC "CreateCompatibleDC" int #cfunc global GetObject "GetObjectA" int, int, var #func global SelectObject "SelectObject" int, int #func global BitBlt "BitBlt" int, int, int, int, int, int, int, int, int #func global DeleteDC "DeleteDC" int #module #deffunc clipgetg local i #define newBmp i.0 #define oldBmp i.1 #define memhdc i.2 #define sizex i.3 #define sizey i.4 await 1 OpenClipboard hwnd // クリップボードを開く if stat = 0 : return 1 // 開けなかったら終了 newBmp = GetClipboardData(2) // クリップボードから画像(2:CF_BITMAP)取得 if newBmp = 0 { CloseClipboard // 取得できなければ終了 return 1 } // ビットマップオブジェクト情報取得(BITMAP構造体24byte) dim bmp, 6 if GetObject(newBmp, 24, bmp) = 0 { CloseClipboard // 取得できなければ終了 return 2 } // メモリデバイスコンテキストを作成 CreateCompatibleDC hdc memhdc = stat // ビットマップオブジェクトを選択(旧オブジェクトは退避しておく) SelectObject memhdc, newBmp oldBmp = stat // 画像情報をコピー if bmp.1 > ginfo_sx : sizex = ginfo_sx : else : sizex = bmp.1 if bmp.2 > ginfo_sy : sizey = ginfo_sy : else : sizey = bmp.2 BitBlt hdc, ginfo_cx, ginfo_cy, sizex, sizey, memhdc, , , 0x00CC0020 // SRCCOPY redraw 1 // 終了処理 SelectObject memhdc, oldBmp // オブジェクトを元に戻す DeleteDC memhdc // メモリデバイスコンテキストを削除 CloseClipboard // クリップボードを閉じる return 0 #global //操作先ウィンドウを2に変更 gsel 2 //clipgetg 命令の使用 clipgetg if stat : dialog "画像の取得に失敗しました。何回も出る場合はお問い合わせ下さい。" //画像の保存 chdir "C:\\Program Files\\screencapture\\capturepicture\\通常モード" bmpsave ""+gettime(0)+gettime(1)+gettime(3)+gettime(4)+gettime(5)+gettime(6)+gettime(7)+".bmp" //操作先ウィンドウを戻す gsel 2 //処理一時停止 wait 200 //最初に戻す gosub *start1 stop //通常モードプログラムここまで ;----------------------------------------------------------------------------------------------------- //連写モードプログラムここから *start2 cls screen 2,ginfo_dispx,ginfo_dispy,2 screen 0,160,110,4 title "連写モード" mes " Print Screenキー" mes " を押してください" objsize 160,25 pos 0,35:button "モード切替",*start1 button "保存画像を見る",*kan2 //キーに反応するやつ *lp2 await 1 getkey k,44 if k=1:goto,*program2 goto *lp2 //メインプログラム *program2 await 1 OpenClipboard hwnd // クリップボードを開く if stat = 0 : return 1 // 開けなかったら終了 newBmp = GetClipboardData(2) // クリップボードから画像(2:CF_BITMAP)取得 if newBmp = 0 { CloseClipboard // 取得できなければ終了 return 1 } // ビットマップオブジェクト情報取得(BITMAP構造体24byte) dim bmp, 6 if GetObject(newBmp, 24, bmp) = 0 { CloseClipboard // 取得できなければ終了 return 2 } // メモリデバイスコンテキストを作成 CreateCompatibleDC hdc memhdc = stat // ビットマップオブジェクトを選択(旧オブジェクトは退避しておく) SelectObject memhdc, newBmp oldBmp = stat // 画像情報をコピー if bmp.1 > ginfo_sx : sizex = ginfo_sx : else : sizex = bmp.1 if bmp.2 > ginfo_sy : sizey = ginfo_sy : else : sizey = bmp.2 BitBlt hdc, ginfo_cx, ginfo_cy, sizex, sizey, memhdc, , , 0x00CC0020 // SRCCOPY redraw 1 // 終了処理 SelectObject memhdc, oldBmp // オブジェクトを元に戻す DeleteDC memhdc // メモリデバイスコンテキストを削除 CloseClipboard // クリップボードを閉じる //操作先ウィンドウを2に変更 gsel 2 //clipgetg 命令の使用 clipgetg if stat : dialog "画像の取得に失敗しました。何回も出る場合はお問い合わせ下さい。" //画像の保存 chdir "C:\\Program Files\\screencapture\\capturepicture\\連写モード" bmpsave ""+gettime(0)+gettime(1)+gettime(3)+gettime(4)+gettime(5)+gettime(6)+gettime(7)+".bmp" //操作先ウィンドウを戻す gsel 2 //最初に戻る gosub *start2 stop //連写モードプログラムここまで *kan exec "explorer C:\\Program Files\\screencapture\\capturepicture"//保存先のフォルダを開く goto *start stop *kan1 exec "explorer C:\\Program Files\\screencapture\\capturepicture"//保存先のフォルダを開く goto *start1 stop *kan2 exec "explorer C:\\Program Files\\screencapture\\capturepicture"//保存先のフォルダを開く goto *start2 stop