Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/21/2016 in all areas

  1. Working example (even if You again use old $sLink ): #include <ie.au3> #include <MsgBoxConstants.au3> _IEErrorHandlerRegister(_User_ErrFunc) _Example() Func _Example() Local $sLink = '' ; $sLink = 'http://www.bikervietnam.com/threads/topic-ban-luan-danh-rieng-cho-dong-future-125-moi-doi-2012-2013.463954/page-2' $sLink = 'http://www.bikervietnam.com/threads/topic-ban-luan-danh-rieng-cho-dong-future-125-moi-doi-2012-2013.463954/#post-7767491' _IELoadWaitTimeout(10000) Local $oIE = _IECreate($sLink, 0, 1, 1) Local $oCommentData = _IEGetObjById($oIE, "post-7767491") If @error Then MsgBox($MB_ICONERROR, '', _ '@error = ' & @error & @CRLF & '@extended = ' & @extended) Else $oCommentData = $oCommentData.innerhtml ;$oCommentData = ClipGet() MsgBox(0, 'FINISHHHHHHHHHHHH', $oCommentData) EndIf EndFunc ;==>_Example ; User's COM error function. ; After SetUp with ObjEvent("AutoIt.Error", ....) will be called if COM error occurs Func _User_ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptFullPath & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_User_ErrFunc @langthang084 You should remember to check for @error after calling function which set @error in case of failure. mLipok
    1 point
  2. Strange... the code below creates a quick list of all the id="post-...." on this page and "post-7767491" doesn't appear in the list #Include <Array.au3> $txt = BinaryToString(InetRead("http://www.bikervietnam.com/threads/topic-ban-luan-danh-rieng-cho-dong-future-125-moi-doi-2012-2013.463954/page-2")) $res = StringRegExp($txt, '<li\h*id="(post-\d+)', 3) _ArrayDisplay($res) Edit It looks like a post deleted http://www.bikervietnam.com/threads/topic-ban-luan-danh-rieng-cho-dong-future-125-moi-doi-2012-2013.463954/goto/post?id=7767491#post-7767491
    1 point
  3. 1 point
  4. Here is some modified example: #include <ie.au3> #include <MsgBoxConstants.au3> _IEErrorHandlerRegister(_User_ErrFunc) $Link = 'http://www.bikervietnam.com/threads/topic-ban-luan-danh-rieng-cho-dong-future-125-moi-doi-2012-2013.463954/page-2' _IELoadWaitTimeout(10000) $IE = _IECreate($Link, 0, 1, 1) $CommentData = _IEGetObjById($IE, "post-7767491") If @error Then MsgBox($MB_ICONERROR, '', _ '@error = ' & @error & @CRLF & '@extended = ' & @extended) $CommentData = $CommentData.innerhtml ;$CommentData = ClipGet() MsgBox(0, 'FINISHHHHHHHHHHHH', $CommentData) ; User's COM error function. ; After SetUp with ObjEvent("AutoIt.Error", ....) will be called if COM error occurs Func _User_ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptFullPath & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_User_ErrFunc You should read: I'll look at your problem again in the evening.
    1 point
  5. Alex1986

    how to show message

    Try this: $hGUI = GUICreate("GUI Example" , 100 ,100) $hBtn = GUICtrlCreateButton("Button" , 30 , 40 , 50 ,20) GUICtrlSetTip($hBtn , "This is Button" , "Button") GUISetState(@SW_SHOW , HWnd($hGUI)) Do Until GUIGetMsg() = -3
    1 point
  6. AutoBert

    how to show message

    Have a look at GUICtrlSetTip()
    1 point
  7. UEZ

    ascii art clock

    I assume czardas means something like this here: http://codegolf.stackexchange.com/questions/10759/build-an-analog-clock
    1 point
  8. I created a software by AutoIT, I call it is: OPA1 License. This soft will support you learn and driving license test in VietNam. Hope you like it ^^ Video: Image: Download: Download software and it's source code: GITHUB or MY Website Thanks to SSCtrlHover - binhnx, GUIRichLabel - MrCreatoR, Icons.au3 - Yashied, StringSize - Melba23. p.s: sr for my eng ^^
    1 point
  9. Yes it is possible. The script below will give you an array with all the computer information. #include <Array.au3> #include <File.au3> Local $GhostInfo RunWait(@ComSpec & ' /c Ghost32.exe -lockinfo > ' & @TempDir & '\GhostInfo.txt', @WorkingDir, @SW_HIDE) $CountLines = _FileCountLines(@TempDir & '\GhostInfo.txt') For $x = 3 To $CountLines $Line = FileReadLine(@TempDir & '\GhostInfo.txt', $x) If $Line <> '' Then If StringInStr($Line, 'not supported') <> 0 Then $Line = '' $GhostInfo &= StringReplace(StringStripWS(StringMid($Line, StringInStr($Line, '"')), 3), '"', '') & '|' EndIf Next $GhostInfo = StringSplit(StringTrimRight($GhostInfo, 1), '|') _ArrayDisplay($GhostInfo, 'Ghost32 LockInfo') GhostInfo[0] = Array Size GhostInfo[1] = Manufacturer GhostInfo[2] = Product Name GhostInfo[3] = Version GhostInfo[4] = Serial Number GhostInfo[5] = UUID GhostInfo[6] = Manufacturer & Product Name Combined GhostInfo[7] = PIII Id
    1 point
×
×
  • Create New...