PIXNET Logo登入

Edison.X. Blog

跳到主文

YouLoveMe() ? LetItBe() : LetMeFree() ;

部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 12月 19 週日 201021:10
  • [A] AutoIt!! 迴圈

AutoIt 回圈大致上分成五類 (1) For... Next (2) While... WhileEnd (3) Do... Until (4) For... In... Next (5) With... EndWith。其中第五項 With... EndWith 必須以物件為對象,此處暫不談論,只說明前四種方式,以1+2+3...+10為例,分述如下。
1. For... Next
$Sum = 0
For $i=1 To 10
     $Sum=$Sum+$i
Next
MsgBox(0, "總合", $Sum) ; Show 55

上述每次增量為 +1,其中還可以再指定每個遞增的量,假設我們只要算出 1+3+5+7+9,每次增量為 +2,改寫如下。
(繼續閱讀...)
文章標籤

edisonx 發表在 痞客邦 留言(0) 人氣(3,840)

  • 個人分類:AutoIt!! Note
▲top
  • 12月 18 週六 201011:54
  • [A] AutoIt!! 條件判斷式

AutoIt 條件判斷式主要分成3種,If ... Then... Else、 Select ... Case、 Switch ... Case ,分敘如下所述。
1. If... Then... Else
(1) 單用一個 If - 判斷一數是否大於零
$Var = 20
If $Var > 0 Then
    MsgBox(0, "標題", "變數大於0")
EndIf
(繼續閱讀...)
文章標籤

edisonx 發表在 痞客邦 留言(1) 人氣(4,276)

  • 個人分類:AutoIt!! Note
▲top
  • 12月 18 週六 201004:37
  • [A] AutoIt!! 運算子

1. 算術運算
= : assign, ex: $Var = 5
+ : 加法, ex: $Var = 10+5 ; $Var = 15
- : 減法, ex:  $Var = 10  - 5; $Var = 5
* : 乘法, ex:  $Var = 10 * 5 ; $Var = 50
/ : 除法, ex:  $Var = 10 / 5 ; $Var = 2
^ :次方, ex:  $Var = 2^3; $Var = 8
&: 字串連接, ex: $Var = "Edi" & "so" & "nX" ; $Var = "EdisonX"
(繼續閱讀...)
文章標籤

edisonx 發表在 痞客邦 留言(1) 人氣(2,148)

  • 個人分類:AutoIt!! Note
▲top
  • 12月 18 週六 201004:19
  • [A] AutoIt!! 巨集

AutoIt 稱巨集的東西,和 C/C++ 的 #define 大同小異,但通常是直接取得一個字串或一個數字,而且巨集開頭一定是 @。如 @SW_HIDE 便代表隱藏並開啟一視窗。聲明,巨集實在是太多了,要用的話請查使用手冊。主要分成四大部份之巨集,在說明前先說二個常用的文字巨集
@LF -> ASCII(10), 也就是 '\n', 用於換行 
@CR  -> ASCII(13), 也就是 '\r', 用於換行
@CRLF -> 這不用說了吧,就是  @CR 加上 @LF, 也就是 "\r\n"
@Tab -> Tab, ASCII(9)
(繼續閱讀...)
文章標籤

edisonx 發表在 痞客邦 留言(0) 人氣(3,175)

  • 個人分類:AutoIt!! Note
▲top
  • 12月 18 週六 201003:51
  • [A] AutoIt!! 變數

1. 變數組成
如之前所提, AutoIt 變數都是以 $ 方式代表變數,變數必須以 $ 為開頭,且只能有數字、字數、底線所組成。
2. Local 變數
使用 Local 宣告時,變數將被視為區域變數。如
(繼續閱讀...)
文章標籤

edisonx 發表在 痞客邦 留言(0) 人氣(3,391)

  • 個人分類:AutoIt!! Note
▲top
  • 12月 18 週六 201003:18
  • [A] AutoIt!! 資料型態

AutoIt 事實上沒什麼資料型態可言,這點和 C 語言差很多,基本上只有數字、字串、布林、二進位、指標這幾種而已。不過這幾種變數轉換方式非常直接,大多不需要經過什麼特別函式就可以直接轉換。
這裡要先說, autoit 的分號代表整行註解。
0. 變數(Variable)
不管什麼型態變數,所有的變數都是用 $ 開頭宣告,而且使用前可以不必事先宣告。但我較習慣事先宣告,所以宣告下來可能就變這樣:
(繼續閱讀...)
文章標籤

edisonx 發表在 痞客邦 留言(3) 人氣(3,234)

  • 個人分類:AutoIt!! Note
▲top
  • 12月 18 週六 201003:10
  • [A] AutoIt!! 介紹

最近有人推我用這套,二年前有聽過 AutoIt 軟體,直譯程式,不過沒用的原因是因為我覺得它是小朋友在玩的東西。直到最近又有人推我用它,很認真花了一小時看說明書裡面有什麼東西,發現 - 真的多到不行!!它主要是拿來寫視窗程式用的,語法非常簡單,據說很像 VB (我沒用過 VB,所以不知道到底像不像) ,其中還有一些 office 自動化的用能;讓人最驚訝的是,它竟然還可以呼叫 .DLL 、COM 元件。
後來上網到官網找,AutoIt 是用 VC6、VC7 寫的。原始碼有開放,重點是抓下來很可能看不懂而已。目前已出到 V3.3.6.1,安裝後都有說明書一步一步教,不過我查過了,目前沒有專門一本書在教 AutoIt!! 然而只看說明檔又覺得很沒有系統,有空的時候我在 blog 做個筆記好了..
(繼續閱讀...)
文章標籤

edisonx 發表在 痞客邦 留言(5) 人氣(1,463)

  • 個人分類:AutoIt!! Note
▲top
  • 12月 15 週三 201011:23
  • [W] Console 視窗控制

這裡主要包出一些函式去控制 Console 視窗,大多都是一邊看 MSDN 一邊去 try。但有些結果我覺得不是很好就註解掉,同時也讓我遇到了一些問題現在還沒辦法解決。下次再研究其它功能的時候,會再發另一篇出來,主要程式碼如下所示...
原始碼
/*
filename: EConsole.h
*/
(繼續閱讀...)
文章標籤

edisonx 發表在 痞客邦 留言(0) 人氣(10,781)

  • 個人分類:Win32-Console
▲top
  • 12月 14 週二 201020:28
  • [W] Console Function

常用 Console Function(截自MSDN)
 





Function
Description


FillConsoleOutputCharacter
Writes a character to the console screen buffer a specified number of times.


GetConsoleTitle
Retrieves the title for the current console window.


GetConsoleWindow
Retrieves the window handle used by the console associated with the calling process.


GetStdHandle
Retrieves a handle for the standard input, standard output, or standard error device.


PeekConsoleInput
Reads data from the specified console input buffer without removing it from the buffer.


ReadConsole
Reads character input from the console input buffer and removes it from the buffer.


ReadConsoleInput
Reads data from a console input buffer and removes it from the buffer.


ReadConsoleOutput
Reads character and color attribute data from a rectangular block of character cells in a console screen buffer.


ReadConsoleOutputCharacter
Copies a number of characters from consecutive cells of a console screen buffer.


ScrollConsoleScreenBuffer
Moves a block of data in a screen buffer.


SetConsoleCursorInfo
Sets the size and visibility of the cursor for the specified console screen buffer.


SetConsoleCursorPosition
Sets the cursor position in the specified console screen buffer.


SetConsoleTitle
Sets the title for the current console window.


SetStdHandle
Sets the handle for the standard input, standard output, or standard error device.


WriteConsole
Writes a character string to a console screen buffer beginning at the current cursor location.


WriteConsoleInput
Writes data directly to the console input buffer.


WriteConsoleOutput
Writes character and color attribute data to a specified rectangular block of character cells in a console screen buffer.


WriteConsoleOutputAttribute
Copies a number of foreground and background color attributes to consecutive cells of a console screen buffer.


WriteConsoleOutputCharacter
Copies a number of characters to consecutive cells of a console screen buffer.


(繼續閱讀...)
文章標籤

edisonx 發表在 痞客邦 留言(3) 人氣(855)

  • 個人分類:Win32-Console
▲top
  • 12月 14 週二 201007:08
  • [W] mouse and keybd

前言
看過 朋友的網誌,決定補充這二個東西。事實上 keybd_event 和 mouse_event 算是最簡單的外掛函式之一,
然而在 Win32 API 與 MFC 裡面仍使用 SendMessage, PostMessage 之方式進行,
(繼續閱讀...)
文章標籤

edisonx 發表在 痞客邦 留言(0) 人氣(3,676)

  • 個人分類:Win32-Console
▲top
«1...25262731»

個人資訊

edisonx
暱稱:
edisonx
分類:
數位生活
好友:
累積中
地區:

熱門文章

  • (4,979)多測資處理
  • (21,952)bitset 整理
  • (83,006)[C&++] 亂數基本使用
  • (444,462)[C] printf 引數說明
  • (39,455)[C] scanf 引數說明
  • (49,843)VBA Procedure 簡述
  • (45,791)VBA 活頁簿(Workbooks)管理
  • (58,126)[浮點數] IEEE754 , C/C++ 浮點數誤差
  • (80,150)[C] 計時器整理
  • (53,347)[Poker] 撲克牌遊戲設計介紹

文章分類

toggle 開發手札 (2)
  • 未實作的想法 (4)
  • 心得筆記 (2)
toggle C/C++ (8)
  • C/C++ Note (52)
  • 亂數 (10)
  • Debug (9)
  • Hidden Features in C (6)
  • OO NOTE (0)
  • 面試題庫 (12)
  • C/C++ FAQ (4)
  • STL Note (3)
toggle 應用軟體/工具 (1)
  • Office (1)
toggle 數值分析 (9)
  • 非線性方程式求解 (10)
  • 矩陣運算 (7)
  • 深入質數 (5)
  • 浮點數 (9)
  • 複數 Complex (2)
  • 積分法 (2)
  • 多項式內差法 (2)
  • 常見關於數 (5)
  • math.h/cmath application (8)
toggle 程式之美 (1)
  • 遊戲之樂 (3)
toggle VB.Net (1)
  • VB.Net Note (1)
toggle 英文 (1)
  • 專題單字 (1)
toggle AutoIt!! (2)
  • AutoIt!! Note (13)
  • Auto-Dll (9)
toggle VBA (4)
  • VBA FAQ (5)
  • VBA Note (9)
  • VBA tec. (1)
  • VBA_Note2 (3)
toggle MFC (1)
  • MFC雜記 (4)
toggle Win32 (8)
  • Process (10)
  • Win32-Console (5)
  • 檔案系統 (1)
  • 音效 (1)
  • 隱喻外掛 (3)
  • System undoc. (0)
  • GDI (2)
  • 記憶體管理 (1)
toggle 環境與Script (4)
  • visual studio (6)
  • 批次檔batch (2)
  • 程式環境架構 (3)
  • Library (3)
toggle 數學整理 (2)
  • 常用公式 (1)
  • 有趣數學 (2)
toggle 演算法 (7)
  • Bit-Hacks (1)
  • AI (13)
  • 大數 (5)
  • 資料結構 (0)
  • 影像 (2)
  • 遞迴-recursive (2)
  • 回溯.列舉.遞迴 (2)
toggle 程設亂語 (1)
  • 胡言亂語 (10)
toggle SmallTalk (1)
  • SmallTalk (27)
  • 未分類文章 (1)

最新文章

  • 轉戰 python
  • [MFC] CArray 注意事項
  • 你真的很狠...
  • [開發手札] tool 整理 <NOTE>
  • [開發手札] vs dll 相容性
  • [開發手札] vc 效率問題
  • [開發手札] 修改 exe 裡面的 constant
  • [開發手札] 受不了 IDE 常當機問題...
  • [Job] Job Journal 130501
  • [面試] some tips

動態訂閱

文章精選

文章搜尋

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣:

留言板