Jump to content

mootius

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by mootius

  1. @stilgar: Brilliant! Thanks for the heads up. So now I am at a new quandary... If I use this code: _FF_Call("jQuery('#email').val('me@gmail.com')") It works as expected and sets the input element with the id=email to me@gmail.com. However if i then do this: _FF_Call("alert(jQuery('#email').val())") // Should return current value for input element with id=email It does not alert anything and the console logs an _FFReceive: _FFCmd Error Any ideas on that? It looks like _FF_Call is actually an _FFCmd with "content.JSWrappedObject." prepended to the string passed to _FF_Call, so I played around with different contexts but could not get an alert with a jquery command inside it to work... I even started playing with __FFSend, but still could not get it to alert the value... Confusing... Thanks!
  2. Has anyone had any luck grabbing/utilizing the jQuery object for a page that has it loaded? AutoIt Example: _FFCmd("jQuery('#some_id').val()") <-- This would typically return a String with the value of the selected element. I've also tried: _FFCmd("jQuery('#some_id').val()", Default, 0) and _FFCmd("jQuery('#some_id').val()", Default, 1) I know it's redundant, but here are 2 JavaScript examples of getting and setting the value using jQuery: JavaScript Example: var $ = jQuery; // Getting the value $('#some_id').val(); // Gets the value of the element with id="some_id" // Setting the value $('#some_id').val('Hello World'); // Sets the value of the element with id="some_id" ...for even more redundancy...here is a bookmarklet that alerts the value in the browser: Bookmarklet Example: javascript:alert(jQuery('#some_id').val()); I think it's a scoping issue, but I'm not quite sure...I can run a bookmarklet with the same code and get the value returned, but for some reason have never been able to touch the jQuery object from within ff.au3. I have tried many variations of the _FFCmd function but just can't seem to grab it. If you have a working solution (aka no guesses) please let me know. Thanks!
  3. resolved...don't know how to delete the thread...
  4. Good Morning! I am fairly new to AutoIt and have only written a few scripts. I am trying to figure out if there is a function that will allow me to capture HTML without loading the page in my browser. E.G. I work in Real Estate and post a lot of ads to Craigslist. I use html code regularly in my ads and wrote a script that will auto-generate my html code for any particular listing. I then adapted the code to build html code for hundreds of listings consecutively. Since my company's intranet database only runs in Chrome and Firefox I opted to use FF.AU3 for most of my Firefox Browser script. Here's how it works: 1. I run a search in my database. 2. As an example, let's say the search returns 100 listings. 3. I then run my program and copy and paste the link for the search results (when I run a search my database saves it as a search number so my link looks something like this: www.realestate.com/search-results/1234). <--- Each search has it's own search number. 4. My program takes all of the search results from the link I provide and builds html code for Craigslist Ads for every listing within that search and saves them as individual text files. But in order to do this it has to load each individual listing in Firefox to pull the html code which brings me to my question: Is there a way I can just grab the HTML code the server is sending back to me without actually having Firefox load the page? E.G. Here is a listing link: www.realestate/listing/12345 <-- I just want html code sent back, but don't want to load the page in Firefox. My script works fine as it is, but I feel like I could really speed things up if I didn't have to wait for page loads for hundreds of listings. Any help is appreciated. I don't expect anyone to provide me with any code, I'll figure it out myself if need be, but just point me in the right direction please. Maybe a function within AutoIT or some UDF you know of...I already searched the forums, but didn't see anything specific to what I'm asking about... Thanks!
  5. Could you be more specific? Honestly, I'm very new to AutoIt, but I'll help if I can. Explain what you're trying to do, or post some code you are trying to get to work...
  6. @meomeo192 #include <FF.au3> _FFStart() _ffwindowselect() ; probably not necessary depending on what you're trying to do _FFTabAdd() _FFTabAdd() _FFTabAdd() _FFTabAdd() $i=0 While $i <= 5 _FFTabSetSelected($i) $i = $i + 1 WEnd Also, I noticed in the FF3 Documentation that the _FFTabSetSelected $vTab parameter says, "prev= next tab." & "next= previous tab." which seems backwards...
×
×
  • Create New...