Jump to content

the123punch

Active Members
  • Posts

    82
  • Joined

  • Last visited

Everything posted by the123punch

  1. Never Mind it is solved .
  2. Hi, I tried using the demo but I think there is some includes missing and it is not compiling. Can you tell me if there is anything missing at the top? It gives me errors of undeclared variables. the123punch
  3. I did follow the link provided but didnt see a concrete example so didn't really know how to use it.. I'm still a newb to AutoIt... thx for the suggestion anyway
  4. Hi PsaltyDS, thank you for your prompt response. I kept searching through the forum and I found access to a library specifically designed for the Active Directory (adfunctions.au3) which I downloaded and used its functions and it works perfectly for what I need it to do. Thanks still for your help and effort. the123punch
  5. Hi, I am wondering if anyone has done this before with AutoIt or a similar scripting language. I need to connect to the Active Directory server and fetch user information from the AD. I am basically creating an application that lets the user type in a login name and validate it with the Active Directory to see if it exists before continuing. Is that ever doable with AutoIt?? Thanks for the help. Greatly appreciated. the123punch
  6. Hi Rasim, This is great as I said in my previous post on the other topic. It is working great thanks a lot. Is it possible though to explain me what all these parameters are ? like "WM_COMMAND($hWnd, $Msg, $wParam, $lParam)", or if you can point me to the right documentation that would be awesome. Thanks again. the123punch
  7. martin, thank you for taking the time to answer. I referred myself to this link but wasn't quite sure how and where to start. rasim, thanks a lot for your code snippet. It is really helpful and working perfectly. I am wondering if there is also a onTextChange Event for an inputBox or do I have to build it manually?? Thanks. the123punch
  8. Hi Spiff59, Can you please elaborate on what you did here? I am a newb to AutoIt and have designed a GUI in which I would like to catch the event when the focus is lost from an input box. Almost the same principle as you but it is with an input box that I would like to handle focus changes. Can you help me with a concrete example of what you did please? Your help would be greatly appreciated. the123punch
  9. Hi water, in your select statement , you have "Case $LBN_KILLFOCUS; Sent when a list box loses the keyboard focus", in which you catch the lostFocus event on a list box. My question to you is is that event created by you or does it come with AutoIt API?? And also if possible, would you know of a way to do it with an input box, to catch whenever that input box loses the focus?? Thanks a lot I would really appreciate your help if you can. the123punch
  10. Hi, I am building a GUI interface for a user creation application to create a user in several different databases. I have 2 questions: 1) Is there a way to catch the OnLostFocus() event of an input box (text box) in the GUI, so that an action is performed right after? 2) What I want to do after the onLostFocus() event of the input box is to search in the Active Directory and look if we have that user already created in AD. Is there a code reference which I could look at to know how it is done for the Active Directory handling? I would really appreciate it if someone could help me on that one very soon. Thanks. the123punch
  11. I am also looking for such a functionality. I am automating a user-creation script which uses Oracle Forms and I need to access Oracle Forms. I would really be glad if someone knows anything about Oracle Forms automation with AutoIt. Thanks. the123punch
  12. Hi, Great thanks for all you guys.. This code seems to return the href of the link that I need. Although, I don't know how to click by href.. Is there any way?? Thanks.
  13. Hi guys, I need to do the following: Go on a database page at the following link: http://mint.bio.uniroma2.it/mint/search/se...eryType=protein I have to search for some proteins and extract information. I know how to do almost everything but I am having a basic problem with some entries. For those who are willing to help, when you go on that page, type in the following gene name: APLP2 Then click on the search. You get 2 results. What I need to do is to click on the one that has Homo Sapiens in it. I know how to get there, I need to use the IE function _IELinkClickByText or _IELinkClickByIndex The problem is both links have the same text so I won't really always get the Homo Sapiens link. I tried to verify how to do it with index but there is no way for me to identify which index is with which link because it is random. In other words, Homo Sapiens is not always the first link or the second or the third. It could be any of them. So basically, the only way to identify my link before clicking it is by look at the html text next to it and check if it says Homo Sapiens or not. I dont know how to do that? How can I refer to a link by the text that comes after it??? I am here giving you the example for only one entry but I have a bunch of them and for some of them I do get more then one result and so I need a solution that will for all of them please.. If anyone can help me, I'll be more than happy.! Thanks.
  14. Hi guys, Another thing I forgot to mention is that the webpage itself from which I want to take information does not have a body tag. Thus maybe (but I am not sure that its that), maybe that fact generates the error. I made a Page -> View Source from internet Explorer on that page and this is the source of the page: <!-- int type: query: --> <html> <frameset rows="70,*" border="0"> <frame src="/mint/search/head.jsp" name="high"> <frameset cols="50%,50%"> <frame src="/mint/search/interactor.do?interactorAc=MINT-1367835&dataSet=&selectedStatus=clean" name="left"> <frame src="/mint/search/interactors.do?interactorAc=MINT-1367835&selectedStatus=clean" name="right"> </frameset> </frameset> <noframes> </noframes> </html> Thanks
  15. Hi, This is the output of _IE_VersionInfo() from a failing script: [0]|V [1]|2 [2]|2 [3]|1 [4]|20070509 [5]|V2.2-1 Some weird behaviour happens also. I decided to bring my own laptop which supposedly works. I plugged it in the same network as my work computer and I get the same error. Is it possible that it might be some kind of firewall issue since the error seems to happen on the network only??? I havent tried to run it on my laptop from a different network (like home for example) but I tried the script again today from another office , different computer and (different IP address) and it worked. That is such a weird issue for me...
  16. Hello Guys, I know this might be an easy one, I am trying to find a string function that will return me an array with all the positions of spaces in that string. I know such functions exist in scripting languages like PHP or perl but I cannot seem to find it in Autoit. If anyone could send me on a lead it would be appreciated. Thank you.
  17. At work I am using IE 7, which is the same version I used at my friend's house and same version I use at home and both these places work. I didn't try the functions _IEPropertyGet($oFrame, "innerText") and _IEPropertyGet($oFrame, "outerText") because it is not working really. For some reason, the error seams to be in the IE library and not in my code because my code is working on other computers... So this must be a very bizarre situation to you guys since it is working fine on your computer, and trust it is as bizarre for myself. I guess I will run that script at home for now, since it is a one-time use for now to mine data, although I might need it in the future for re-use. If any of you guys has seen this before or knows what the problem might be, it would be great to let me know. Thanks mikehunt for your will to help.
  18. Hi, I uploaded the files hussny.txt and swissprot.txt which my script relies on. I also verified which version I have, as I have just downloaded the latest version of Autoit script. What I find strange is that I tried the script from a friend's house and it worked fine but not from work. Finally, the following is the exact complete message that I received from the SciTe controle: >"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\hassan\Desktop\DB-Proj\Scripts\prot_interaction.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams +>16:16:19 Starting AutoIt3Wrapper v.1.9.1 >Running AU3Check (1.54.7.0) from:C:\Program Files\AutoIt3 +>16:16:20 AU3Check ended.rc:0 >Running:(3.2.4.9):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\hassan\Desktop\DB-Proj\Scripts\prot_interaction.au3" --> IE.au3 Warning from function _IEAttach, $_IEStatus_NoMatch C:\PROGRA~1\AutoIt3\Include\IE.au3 (2137) : ==> The requested action with this object has failed.: Return $o_object.document.body.innerText Return $o_object.document^ ERROR ->16:16:24 AutoIT3.exe ended.rc:1 +>16:16:25 AutoIt3Wrapper Finished >Exit code: 1 Time: 6.472 thanks.
  19. Hi Guys, I am having trouble getting a frame reference from a webpage from I have to extract information. The following is the relevant of my code: CODE #include <IE.au3> #include <File.au3> #include <Array.au3> ;Creating Internet Explorer variables and array for file reading $aArray = _ArrayCreate(0) _FileReadToArray("swissprot.txt", $aArray) ;_ArrayDisplay($aArray) $bArray = _ArrayCreate(0) _FileReadToArray("hussny.txt", $bArray) $url = "http://mint.bio.uniroma2.it/mint/search/searchWelcome.do?queryType=protein" $oIE = _IECreate($url, 1, 1) $oForm = _IEFormGetCollection ($oIE, 0) $oInput = _IEFormElementGetObjByName($oForm, "ac") For $i = 6 To 6;$aArray[0] Step +1 ;Re-assign variables to newly visible objects $oForm = _IEFormGetCollection ($oIE, 0) $oInput = _IEFormElementGetObjByName($oForm, "name") $oSubmit= _IEFormElementGetObjByName($oForm, "submit") $splittedString = StringSplit($aArray[$i], ";") _IEFormElementSetValue($oInput, $splittedString[1]) $oSubmit.click ;_IEFormSubmit ($oForm) _IELoadWait($oIE) $oFrame = _IEFrameGetCollection($oIE, 1) ;$oFrame = $oFrames[2] $sText = _IEBodyReadText($oFrame) MsgBox(0, "f", $sText) ;$filewrite = OpenFile("temp.txt",2) ;FileWrite($filewrite, $sText) ;FileClose($filewrite) ;GetData($bArray[$i]) Next I am getting an error when I run this script. The error is the following which I get within the Scite editor: C:\PROGRA~1\AutoIt3\Include\IE.au3 (2137) : ==> The requested action with this object has failed.: Return $o_object.document.body.innerText Return $o_object.document^ ERROR ->17:04:08 AutoIT3.exe ended.rc:1 I don't understand why it is giving me an error in the IE.au3 library and not in my code. Is there anything wrong which I am doing or is it some problem with the library code?
  20. Hello Guys, Another questions from a newb. I am wondering if there is a way to debug an autoit script during runtime, just like in Java or C++ for example. If we can put breaks on certain lines so that the script stops at that specific line and we can actually view the contents of each variable... If there is it would be so much easier to debug our programs. Does anyone have a clue?? Thank you. Your help will be appreciated.
  21. Hi Guys, Basically I have a file from which I need to extract some specific data. In this case, I have the following data in my file: CODESequence databases EMBLAF006084; AAB64189.1; -; mRNA.[EMBL / GenBank / DDBJ] [CoDingSequence] AC004922; -; NOT_ANNOTATED_CDS; Genomic_DNA.[EMBL / GenBank / DDBJ] BC002562; AAH02562.1; -; mRNA.[EMBL / GenBank / DDBJ] [CoDingSequence] BC002988; AAH02988.2; -; mRNA.[EMBL / GenBank / DDBJ] [CoDingSequence] BC007555; AAH07555.1; -; mRNA.[EMBL / GenBank / DDBJ] [CoDingSequence] What I need to do is extract only the first data out of each line. To be more clear, if you look at the second line, which starts with EMBLAF006084.... I need to extract only the first data before the semi-colon. In the case of that line only I would not need the EMBL to be there. For the other lines it is the same thing. I basically just need to extract the first entry which is before the first semi-colon. My file is bigger then just that snippet of code but I didnt want to paste the whole thing. Basically if there is a way of verifying each line and taking only the entry before it finds the first semi-colon I think it would solve my issue. Can anyone help?? Thanks.
  22. Thanks Lespoils, It is good to know for that additional feature of IELoadWait. Greatly appreciate your help guys. Thanks.
  23. Hi, Thanks a lot. It seems like you are the lucky winner mikehunt114. You solved my problem. really appreciated. I was just wondering how did u make it so that it runs in the background. Because the first way I had done it it would always run in the foreground and I couldnt do anything without disturbing the script.. So basically while the script was mining I couldnt do anything i had to wait for it to finish. I tried putting the option of IE_Create to 0 (so that it is not visible) but it was giving me errors... So I am wondering how you did it. Thanks again..
  24. Hi, The only reason why I put line numbers is so that the people who don't want to download the script could refer to it just by reading it. I have attached my script as well in case you want to download it and try it. Thanks for your help.
×
×
  • Create New...