ºô­¶¼ÐÃD¡G ´ú¸Õ AutoIt ¼ÒÀÀÂI¦r¾÷

Warning: fopen(/home/crazy/www/cmsb/bcj/has_read.php): failed to open stream: Permission denied in /home/crazy/www/compose/reading.php on line 2077

Warning: fputs() expects parameter 1 to be resource, bool given in /home/crazy/www/compose/reading.php on line 2079

Warning: fclose() expects parameter 1 to be resource, bool given in /home/crazy/www/compose/reading.php on line 2080
¡@



¡@¥Ñ©ó kealy ªº«Øij¡A§Ú§ó·s¤F¥i¥H¦b¿Ã¹õ¤W¥´¥X¡uÂI¦r¡vªº AutoIt ¸}¥»µ{¦¡¡C½Ð¨Ó³o¸Ì¸Õ¬Ý¬Ý¡C

¡@³o­Ó´ú¸Õª©¥»§â¦rÅé±q 150 ÁY¤p¬° 20, ¨ÃÅý¥´¦rªº°Ï°ì¸¨¦b¥¿¤¤¥¡¡A´å¼Ð¦ì¸m¦b§Ö­n 40 ¤è®É¦³Án­µ´£¥Ü¡A¶W¹L 40 ¤è§Y´«¦æ¡C¥H¤U¬O§Þ³N¤Wªº²Ó¸`©M¤wª¾¦Ó¥¼³B²zªº°ÝÃD¡C


¡@¨ä¹ê¨S¦³¥²­nÅý¥´¥X¦rªº°Ï°ì¤@©w¸¨¦b¤¤¥¡¡A¤£¹L¦Ò¼{ÂI¦r¾÷ªº¤u§@½d³ò½T¹ê©~¤¤¡A¥H¤Î§Æ±æ¹ï±±¨î¶µªº®y¼Ð¡B¤j¤pµ¥¶q¤ÆªºÄݩʧó¥[¤F¸Ñ¡A§Ú¯S§O§ä¥X¿ìªk°µ¨ì³oÂI¡C

¡@¤å¦r½s¿è°Ïºû«ù¸òª©¤@¼Ë¥þµøµ¡ªº¤j¤p¡A¦ý¬O³Ð«Ø§¹«á´N¶i¤J AdjustTextAreaLayout ¨ç¦¡¡A¸Ó³B¦bª©¥u¬O¤@­Ó³]¸m¦r§Îªº«ü¥O¨ç¦¡¤¤¦³¤T­Ó¥D­n¨BÆJ¡G³]¸m¦r§Î¡B´ú¶q»Ý­nªºÅã¥Ü¤j¤p¡B½Õ¾ã¤å¦r½s¿è°Ï³]©w¡C«á­±¤G­Ó¨BÆJ¬O¤U¦C¸ÑÄÀªº­«ÂI¡C

¡@­º¥ý³z¹L GetTextSize ¨D¥X¡u¤@­Ó¡vÂI¤è»Ý­nªºÅã¥Ü¼e«×¡A¦b GetTextSize ¤§¤¤ªº¨BÆJ¦³¡G

  1. ¥Î _WinAPI_GetDC §ä¥X½s¿è°Ïªº Device Context, ¤]´N¬O¤@¨ÇÃö©ó¥¦ªº GUI ³]©w¡A±q _WinAPI_GetDC ®³¨ìªº¬O¥¦ªº§â¬` (handle).
  2. ³z¹L _SendMessage ¹ï½s¿è°Ïµo°e $WM_GETFONT ®ø®§¡A°Ý¥X½s¿è°Ï²{¦b¥Îªº¦rÅé³]©w¡C
  3. ¥Î _WinAPI_SelectObject «ü©w¦rÅé¤è­±ªº³]©w¡C
  4. ¥Î _WinAPI_GetTextExtentPoint32 ¨D¥X³o­Ó¦r¦êªºªø¼e¡A³æ¦ì¬O pixel (px).
  5. ¥²¶·¦A¥Î¤@¦¸ _WinAPI_SelectObject ±N³]©wÁÙ­ì¹w³]¡C
  6. ¥Î _WinAPI_ReleaseDC ÂkÁÙ¿û§÷ _WinAPI_GetDC ¸ò¨t²Î­n¨Óªº Device Context ªº§â¬`¡C
  7. ¶Ç¦^±o¨ìªº¦r¦êªø¼e¸ê°T¡C

¡@±o¨ì¨C¤è»Ý­nªºÅã¥Ü°Ï°ì¤j¤p¡A¥i±À±o 40 ¤è»Ý­nªºÅã¥Ü¼e«×¡C±µµÛ­n½Õ¾ã½s¿è°ÏªºÃä¬É (margin) ³]©w¡A´«¨¥¤§´N¹³¤å¦r¸ò¯ÈÃä½t¤§¶¡ªº¯d¥Õ¡C¤èªk¬O¥ý§âÃä¬É°²³]¦¨¥ª¥k³£¬O 0, µM«á¨D¥X¥Ø«e¥´¦r®Ø®Ø©Ò¦b°Ï°ìªº¼e«× ($r[2]-$r[0]), µM«á¦©°£ 40 ¤è»Ý­nªº¼e«×«á³Ñ¤U´N¬O¥ª¥kÃä¬ÉÁ`©Mªº¼e«×¡A§â¥¦§¡¤À¨â¥bµ¹¥ª¥k±o¥X $w, ¦A§âÃä¬É¼e«×³]¬°¥ª¥k¦U $w. ³o»ò¤@¨Ó¡Aµøı¤W 40 ¤è´N·|¦Û¤v´«¦æ¡C

¡@¥t¥~¤@³B­×§ï¦ì¦b°e¥X­nÅã¥ÜªºÂI¤è¤§«e¥ý¨ú±o¥Ø«e´å¼Ð©Ò¦bªº¦ì¸m¡A¦pªG¤w¸g¶W¹L 35 ¤è¡A´N·|°e¥XÁn­µ´£¥Ü¡C§Ú¥Îªº¬O Windows ¤ºªº _WinAPI_MessageBeep ¤£¬O AutoIt ªº Beep, ¦]¬°§Ú¤@ª½¨SÅ¥¨ì Beep µo¥XªºÁn­µ¡C

¡@¨ä¹ê§Ú­ì¥»·Q°µ¨ì¡A½s¿è°ÏÃä¬É³]¬° 0, §â¦rÅé¤j¤pºÉ¶q©ñ¤j¨Ï±o 40 ¤è«ê¦n¥Î±¼¾ã­Ó¿Ã¹õ¼e«×¡A¦ý±q px ³æ¦ì­n¤Ï±À¦^¦rÅé¤j¤p¡A¥i¯à­nª¾¹D·í¤U¿Ã¹õªº DPI ³]©w¡A¥i¬O¯àª½±µ¨ú±o¸Ó³]©wªº¨ç¦¡¦p GetDpiForMonitor ³s Windows 7 ³£¨S¦³¤º«Ø¡A¥u¦n¥ý±N´N©T©w¤j¤p 20, ©ÎªÌ¥¼¨Ó§ï¦¨¤¹³\¨Ï¥ÎªÌ¦Û¤v½Õ¾ã¡C

¡@µM¦Ó¡A¤´¦³«Ý¸Ñ¨Mªº°ÝÃD¡G

  1. ¹ê»ÚÂI¦r¾÷¦pªG´å¼Ð¤§«á¦³¦r¡A·|ª½±µ§â·s¥´ªºÂI¡u¥[¤W¥h¡v¡A¦ý¬O¹q¸£ªº¤å¦r½s¿è·|±N­ì©l¸ê®Æ¦V«á±À¡C
  2. ­n¬O¸ê®Æ³Q©¹«á±À¦ÓÀ½¨ì¤U¤@¦æ¡A·í¥´¦nªº¤º®e½Æ»s¶K¨ì§O³B¡A¨ºùØ´N¤£·|¨Ì·Ó­ì¥»¬Ý°_¨Óªº¦³´«¦æ¡C

¡@¥H¤U¬O¥Ø«eªºµ{¦¡½X¡G


¦^ ¡P ´ú¸Õµoªí¤å³¹¡A¡u¥i¥H¦b¿Ã¹õ¤W¥´¥X¡uÂI¦r¡vªº AutoIt ¸}¥»µ{¦¡¡v ³o¤@½g¤å³¹«Ê­±


¥»¤å±i¶KªÌ¡GBo-Cheng Jhan¡e±i¶K®É¶¡¡G¥Á°ê105¦~4¤ë22¤é¡]¬P´Á¤­¡^22ÂI13¤À¡f | °Ñ³X³¡¸¨¡G¡uSponge Jhan µ{¦¡³]­pµ§°O¡v

¦^¥»­¶¥Ø¿ý


¾Ç²ßªº¬G¶m­º­¶
¥»¯¸¤½§i¡G¡e±z¶V»Ý­n§Ú­Ì¡A§Ú­Ì´N¶V¦³³Ð·N¡f ¥»¯¸»¡©ú®Ñ¡G¡eµo²{¬G¶mÁÙ¦³§ï¶iªº¦a¤è¡A½Ð¨Ó«H§i¶D­ì¤B­Ì¡f
Æ[¹îÀ³¥Î¾Ç²ßÂI¼Æ ¡G¡e«¥ªº¬G¶m¦³±zªº°Ñ»P¡A·|¨Ï§Ú­Ì¦³§ó¤jªºµo´§ªÅ¶¡¡A®i²{§óÂ×´Iºë±mªº¾Ç²ßµe­±¡f ¡e´Á«ÝÂǥѵL»Ùêºô­¶³]­p¡A¯àÅýµø»Ù¤pªB¤Í§ó·R¬Ý®Ñ¡B§ó·R¼g§@¥B§ó·R¾Ç²ß¡f¡Gª¼¥Î¹q¸£¡u¤ß±o¤À¨É¡v
¡e¬°¤FÅý§Ú­Ì¦³°®²bªº¾Ç²ßÀô¹Ò¡A½Ð¤Å¥ô·N¦b¥»¯¸´²¼½°Ó·~¼s§i»P¤£¦Xªk¤å¥ó©ÎÁpµ²¡f¡G¥»¯¸«Å¥Ü