Jump to content

bogQ

Active Members
  • Posts

    1,944
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by bogQ

  1. Dont know what is mydllo.dll but for me MyDLL.dll works correctly when i test it with the script i posted, if it dont work for you try to put this line on top of my script to see will MyDLL.dll work for you #AutoIt3Wrapper_usex64=n i do not know if this directive need full scite version from autoit site, but its allwayes good to instal full scite version. That shud force not to use 64 in this case Ask ChrisF on that forum, is mydll.dll compiled with Free Pascal. If it is ask him if they can provide you with its source, then youl have your answer...
  2. according to post found on forum.lazarus using MyDLL.dll from that post on func MyAddFunction from that dll. If that dll is compiled using Free Pascal, then autoit works with no problem i think... if i understud code from that files correctly on that post ofc #include <Array.au3> $dll = DllOpen('MyDLL.dll');dll is located next to script, btw im running 32 bit just for your info :P $r = DllCall($dll,'uint','MyAddFunction','uint',2,'uint',3);func shud return sum of first and second parametar in arraye[0] (first array element) If @error Then MsgBox(0,'',@error) _ArrayDisplay($r);returning result And if thats the case then you have problems with Pascal side of your code (coding) and not with autoit, or you have problems with 32 vs 64.
  3. quick google search '?do=embed' frameborder='0' data-embedContent>>
  4. insert this after your Opt("TrayMenuMode", 1) TraySetClick(1);1 = Pressing primary mouse button
  5. _GUICtrlDTP_SetSystemTime( $g_hDTP, $sDate ) not _GUICtrlDTP_SetSystemTime( GUICtrlGetHandle($g_hDTP), $sDate ) when creating DTP with _GUICtrlDTP_Create it already returned a handle: You cant get handle of a handle with GUICtrlGetHandle() , you need control ID in GUICtrlGetHandle() to get a handle , aldo you already have handle that you need, dont you?
  6. Cant test script under my XP but if your getting array to display some part of it you can use Msgbox(0,'title',$LineInfo[5]); so $LineInfo[5] is 6-th line from array display (6-th coz array count from 0 and not from 1)
  7. Dont know if something like this catagorize as bug at all... but my main question is where are your icons? Sloppy edited a random script from AutoIt forum for this purpose: #include <WindowsConstants.au3> #include <Misc.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #Include <GuiImageList.au3> #include <GuiListView.au3> #NoTrayIcon Opt("GUIOnEventMode", 1) _Singleton(@ScriptName) $hGUI=GUICreate ("test", 500,300,-1,-1) GUISetOnEvent($GUI_EVENT_CLOSE, "_GuiMsg") $hListView = GUICtrlCreateListView("", 0, 0,500, 300) GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif") _GUICtrlListView_SetExtendedListViewStyle($hListView, $LVS_EX_CHECKBOXES) GUICtrlSetStyle($hListView, $LVS_SMALLICON) ;~ $hImage = _GUIImageList_Create(32, 32, 5, 3) $hImage = _GUIImageList_Create(1, 32, 5, 3);use upper to fully display icons ;~ _GUIImageList_AddIcon($hImage, "shell32.dll", "15", True) ;Extract large icons;ennable this line to display icons _GUICtrlListView_SetImageList($hListView, $hImage, 1) ;but use as small icons For $x = 0 To 99 _GUICtrlListView_AddItem($hListView, 'Testtttt'&$x + 1 , 0) Next _GUICtrlListView_SetView($hListView, 2) ;Set the view mode (2 = List) GUISetState() While 1 Sleep(100) Wend Func _GuiMsg() Switch @GUI_CTRLID Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MINIMIZE guisetstate(@SW_MINIMIZE) EndSwitch EndFunc
  8. your @SW_HIDE parametar isn`t on correct place, look in the help file for where to place @SW_HIDE parametar on ShellExecuteWait command
  9. ConsoleWrite(ubound(($aOuter[0][1])) & @CRLF) ;; does not work To me it say it return 1 (and that is correct result if you ask me). If you're looking for columns instead of rows please open your help file and read UBound and its second parametar 'Dimension'. PS: if you did not understand what im saying then _ArrayDisplay is your best frend
  10. ok, so after some pm-s with OP, getting handle of controll and sending with handle somehow worked for him Test 1 maybe worked or maybe did not work but there was his ip adress so i did not want to post results here Test 2 and 5 worked with no problem and if you ask me that's more than enough for me test('[CLASSNN:WindowsForms10.EDIT.app.0.378734a15]', 2) test('WindowsForms10.EDIT.app.0.378734a15', 5) Func test($data, $try) ConsoleWrite('!> ---------------test:' & $try & ':' & $data & @CRLF) Local $winHwnd = WinGetHandle("CPACS Connector Configuration Tool") WinActivate($winHwnd) WinWaitActive($winHwnd) Sleep(1000) Local $contHwnd = ControlGetHandle($winHwnd, '', $data) If Not @error Then ConsoleWrite('!> ' & 'Looks ok from heare.' & @CRLF) Sleep(1000) ControlSend($winHwnd, '', $contHwnd, $try) If @error Then ConsoleWrite('!> ' & "ControlSend error!" & @CRLF) Sleep(1000) Local $text = ControlGetText($winHwnd, '', $contHwnd) If @error Then ConsoleWrite('!> ' & "ControlGetText error!" & @CRLF) Exit EndIf ConsoleWrite('!> ControlGetText:' & $text & @CRLF) ControlSetText($winHwnd, '', $contHwnd, '') Else ConsoleWrite('!> ' & "ControlGetHandle error!" & @CRLF) EndIf EndFunc ;==>test
  11. yea i know, i mesed up NN and with no NN you get the point try to test to see if you get the focus, try ids and what ever you have
  12. edit forth edit, so many mistakes when typing try now
  13. my bad, edited upper code, can you retry updated code one more time?
  14. try to run this from scite and copy paste console output for us to see test('[CLASS:WindowsForms10.EDIT.app.0.378734a; INSTANCE:15]', 1) test('[CLASSNN:WindowsForms10.EDIT.app.0.378734a15]', 2) test('[INSTANCE:15]', 3) Func test($data, $try) ConsoleWrite('!> ---------------test:' & $try & ':' & $data & @CRLF) Local $winHwnd = WinGetHandle("CPACS Connector Configuration Tool") If IsHWnd($winHwnd) Then WinActivate($winHwnd) WinWaitActive($winHwnd) Sleep(1000) If ControlFocus($winHwnd, '', $data) Then Sleep(1000) Local $focus = ControlGetFocus($winHwnd) If @error Then ConsoleWrite('!> ' & "ControlGetFocus error!" & @CRLF) Else ConsoleWrite('!> ' & $focus & @CRLF) If $focus == 'WindowsForms10.EDIT.app.0.378734a15' Then ConsoleWrite('!> ' & 'Looks ok from heare.' & @CRLF) Sleep(1000) ControlSend($winHwnd, '', $data, '11') If @error Then ConsoleWrite('!> ' & "ControlSend error!" & @CRLF) Sleep(1000) Local $text = ControlGetText($winHwnd, '', $data) If @error Then ConsoleWrite('!> ' & "ControlGetText error!" & @CRLF) Exit EndIf ConsoleWrite('!> ControlGetText:' & $text & @CRLF) Else ConsoleWrite('!> ' & ControlGetFocus($winHwnd) & ' VS WindowsForms10.EDIT.app.0.378734a15' & @CRLF) EndIf EndIf Else ConsoleWrite('!> ' & "ControlFocus error!" & @CRLF) EndIf Else ConsoleWrite('!> ' & "CPACS win error!" & @CRLF) EndIf EndFunc ;==>test
  15. I presume that your post was connected to post i replied to so that is why you pm-ed me with link. So im gonna tell you something similar to what i told him. Use ControlFocus and ControlGetFocus to confirm that you can set focus to the control. if it did not work first time, try WinActivate and WinWaitActive with some sleep before ControlFocus and ControlGetFocus. post heare what happend after that test. If you can set focus try to set focus and after that use ControlSend and ControlSetText to see can you use Control*(commands) only on Controls that have focus.
  16. $oElem = $oIE.document.GetElementsByTagName("p").item(1).innerText()
  17. you need to check do $oIE.document.getElementsByTagName('p') return array?
  18. for the first problem my assumption is that some other tab is activated, try to see if it works if you switch to that tab manualy before you try to click or send space on button that is connected to that tab, ofc still try to use ClassnameNN in controlID parametar
  19. Please, do what Melba23 requested first, if he say its ok im shure someone will continue conversation with you.
  20. put WinWaitActive after WinActivate and some sleep 1 second or something try ControlFocus and check do correct control got the focus with ControlGetFocus if that part worked do a ControlSend {space} instead of ControlClick, if it did not worked tell us what ControlGetFocus returned
  21. While i dont like that you did not post your reason for not releasing what have you try so far in code form, my suggestionm is try to use ClassnameNN and i hardly think youl get more help than this if you dont post something that can replicate problem...
  22. i don`t know what is happening on your machine but i did load pid to variable so try to edit last 3 lines to this ProcessWaitClose($pid) MsgBox(0, "INFO", "Computer is now shutting down");Here the Shutdown command will come in EndIf basically the process you run process need be checked do it still exsist
  23. maybe something like this? If MsgBox(1, "Shutdown", "Are you sure you want to shut down?") = 1 Then AutoItSetOption("WinTitleMatchMode", 2) Do If ProcessExists("syncappw.exe") Then ProcessClose("syncappw.exe") ;close the program if already running ProcessWaitClose("syncappw.exe") $pid = ShellExecute("C:\Program Files (x86)\Allway Sync14\Bin\syncappw.exe", "-s -e") ;open it again with parameters that starts sync and ends program when sync is done Until Not WinWait("Not Responding", '', 5) MsgBox(0, "INFO", "Computer is now shutting down");Here the Shutdown command will come in EndIf
  24. I did just now, but hope that they dont get mad coz of "DO NOT REPORT BUGS OR REQUEST NEW FEATURES FOR THIS FEATURE." in func description, but what to do after 2 years of "nothing happend from that topic" :/
×
×
  • Create New...