Arclite86 Posted February 20, 2014 Author Share Posted February 20, 2014 (edited) Being unfamiliar with tweepi, what is the purpose of the function? I can't see why you would have to switch back and forth between AutoIt and javascript. the purpose of this function is too follow 20 or 40 twitter users at one time instead of adding it one by one, they had a "tweepi sellect all" function but they removed it i contacted the admin and he gave me this link: https://s3.amazonaws.com/yaco2k/tweepi-bl/index.html but as you see it written in javascript so i dont know if it possible to run it on autoit? but if I can focus this code Send("{LSHIFT}^{LCTRL}^{B}") Send("{ENTER}") Send("{ENTER}") to the firefox window would be even greater but i dont know if that is possible Edited February 20, 2014 by Arclite86 Link to comment Share on other sites More sharing options...
Arclite86 Posted February 20, 2014 Author Share Posted February 20, 2014 (edited) the button to click: <button tabindex="0" class="x-btn-text " aria-disabled="false" aria-describedby="x-auto-5" style="width: 49px; position: relative;" type="button">Next<img class=" x-btn-image" role="presentation" style='background: url("http://tweepi.com/js/tweepigxt/67791A54F68E6C387B9AEF4E96FFB252.cache.png") no-repeat -274px 0px; left: 0px; top: 0px; width: 16px; height: 16px; position: absolute;' onload='this.__gwtLastUnhandledEvent="load";' src="http://tweepi.com/js/tweepigxt/clear.cache.gif" border="0"></button> I have tried to use: $oButton1 = _FFXPath("//button[@src='http://tweepi.com/js/tweepigxt/clear.cache.gif']") _FFClick($oButton1) this: $oButton1 = _FFXPath("//button[@tabindex='0']") _FFClick($oButton1) and this: $oButton1 = _FFXPath("//button[@class='x-btn-text ']") _FFClick($oButton1) but they all doesnt work Edited February 20, 2014 by Arclite86 Link to comment Share on other sites More sharing options...
Arclite86 Posted February 21, 2014 Author Share Posted February 21, 2014 (edited) I need to press a few buttons to succeed my project, but how can I focus keys like: Send("{LSHIFT}^{LCTRL}^{B}") on a firefox window so when I minimize the window (running on the background)and Im doing other stuff on my computer the script will stil run and the "send" keys keep focused on the firefox project/window. Edited February 21, 2014 by Arclite86 Link to comment Share on other sites More sharing options...
water Posted February 21, 2014 Share Posted February 21, 2014 Did you have a look at the FireFox UDF? You can directly automate FF without the need to send keystrokes. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Arclite86 Posted February 21, 2014 Author Share Posted February 21, 2014 Did you have a look at the FireFox UDF? You can directly automate FF without the need to send keystrokes. I did read the firefox UDF, but in my project I need to press a few keys to get the job done and that are very hard to accomplish with "_FFXPath" and "_FFCmd" Link to comment Share on other sites More sharing options...
Bert Posted February 21, 2014 Share Posted February 21, 2014 Using the Firefox UDF is still the best way to go. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
water Posted February 21, 2014 Share Posted February 21, 2014 Send only works for the active window. You either need to activate the window before you send some data or you need to make it work with the FF UDF. I can't think of any other solution. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Arclite86 Posted February 21, 2014 Author Share Posted February 21, 2014 (edited) Using the Firefox UDF is still the best way to go. than can you please help me with activating this code: javascript:(function(){var%20a=function(b,c,d){return%20a=document.getElementsByClassName?function(a,b,c){c=c||document;for(var%20g,d=c.getElementsByClassName(a),e=b?new%20RegExp('\\b'+b+'\\b','i'):null,f=[],h=0,i=d.length;i>h;h+=1)g=d[h],(!e||e.test(g.nodeName))&&f.push(g);return%20f}:document.evaluate?function(a,b,c){b=b||'*',c=c||document;for(var%20i,j,d=a.split('%20'),e='',f='http://www.w3.org/1999/xhtml',g=document.documentElement.namespaceURI===f?f:null,h=[],k=0,l=d.length;l>k;k+=1)e+='[contains(concat(\'%20\',%20@class,%20\'%20\'),%20\'%20'+d[k]+'%20\')]';try{i=document.evaluate('.//'+b+e,c,g,0,null)}catch(m){i=document.evaluate('.//'+b+e,c,null,0,null)}for(;j=i.iterateNext();)h.push(j);return%20h}:function(a,b,c){b=b||'*',c=c||document;for(var%20g,i,d=a.split('%20'),e=[],f='*'===b&&c.all?c.all:c.getElementsByTagName(b),h=[],j=0,k=d.length;k>j;j+=1)e.push(new%20RegExp('(^|\\s)'+d[j]+'(\\s|$)'));for(var%20l=0,m=f.length;m>l;l+=1){g=f[l],i=!1;for(var%20n=0,o=e.length;o>n&&(i=e[n].test(g.className),i);n+=1);i&&h.push(g)}return%20h},a(b,c,d)},b=function(a,b){if(-1==a.className.indexOf('x-grid3-row-selected')){var%20c=document.createEvent('MouseEvents');c.initMouseEvent('mousedown',!0,!0,window,0,0,0,0,0,b,b,b,b,0,null),a.dispatchEvent(c);var%20d=document.createEvent('MouseEvents');d.initMouseEvent('click',!0,!0,window,0,0,0,0,0,b,b,b,b,0,null),a.dispatchEvent(d)}};try{if(-1==window.location.href.indexOf('tweepi.com'))throw'';var%20c=document.createElement('script');c.textContent='window.fua();',(document.head||document.documentElement).appendChild(c),c.parentNode.removeChild(c);var%20d=a('x-grid3-rows','div',document.getElementById('tweepiGridDiv'));if(d.length<=0)return;b(d[0],!1),b(d[d.length-1],!0)}catch(e){alert('Something%20went%20wrong.%20Please%20make%20sure%20you%20are%20on%20a%20Tweepi.com%20page!%20'+e)}})(); i can activate it with the "send" function: Send("{LSHIFT}^{LCTRL}^{B}") ;Opens bookmarks Send("{ENTER}") ;Selects the first bookmarkt ( the javascript code) Send("{ENTER}") ;Presses ok But than Firefox needs to be actieve all the time so im not able to use my pc for a few hours that would not be very practical Edited February 21, 2014 by Arclite86 Link to comment Share on other sites More sharing options...
Developers Jos Posted February 21, 2014 Developers Share Posted February 21, 2014 (edited) @Arclite86, How many threads are you planning to open to get your question posted? Please stick to one. Jos Edited February 21, 2014 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Arclite86 Posted February 21, 2014 Author Share Posted February 21, 2014 I want to create a function in the firefox it needs to simulate a few key combinations like :"ctrl+shift+b than 2x enter" I know how i can do this with the "sent " but I want use it in the firefox udf, so the key combinations will be focused on the firefox browser even when the window is not actieve (minimized, running in the background) could somebody please help, I think allot of other autoit users would be very glad with this new function Link to comment Share on other sites More sharing options...
Developers Jos Posted February 21, 2014 Developers Share Posted February 21, 2014 (edited) I want to create a function in the firefox it needs to simulate a few key combinations like :"ctrl+shift+b than 2x enter" I know how i can do this with the "sent " but I want use it in the firefox udf, so the key combinations will be focused on the firefox browser even when the window is not actieve (minimized, running in the background) could somebody please help, I think allot of other autoit users would be very glad with this new function Which part of my post was unclear to you? Open another topic and you get some time away from our forums. Edited February 21, 2014 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Bert Posted February 21, 2014 Share Posted February 21, 2014 (edited) @ Jos: He does not like the answer we are giving him and he figures he can keep asking until he gets what he wants. I suspect if he keeps this up you will need to break out your 2x4. @ Arclite86: You have been told the answer several times now - use Firefox.au3 to do this. If this is beyond your skills then learn how to code by looking at the AutoIt Wiki, YouTube, and take AutoIt 1 2 3. Asking the same question over and over will get you "corrected" by a moderator. We are happy to help you but you HAVE to put forth an effort to LEARN something new and get outside your comfort zone. Edited February 21, 2014 by MBALZESHARI The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Arclite86 Posted February 21, 2014 Author Share Posted February 21, 2014 @ Jos: He does not like the answer we are giving him and he figures he can keep asking until he gets what he wants. I suspect if he keeps this up you will need to break out your 2x4. @ Arclite86: You have been told the answer several times now - use Firefox.au3 to do this. If this is beyond your skills then learn how to code by looking at the AutoIt Wiki, YouTube, and take AutoIt 1 2 3. Asking the same question over and over will get you "corrected" by a moderator. We are happy to help you but you HAVE to put forth an effort to LEARN something new and get outside your comfort zone. I asked a whole new question: first I asked about focusing the sent function than: if I can simulate the javascript with autoit now: adding a new function in the firefox UDF I dont see any rules I break, I opened 3 threads because this are 3 different subject that I want the viewers to see separately But if that is not allowed to I will not openen new threads. We are happy to help you but you HAVE to put forth an effort to LEARN something new and get outside your comfort zone. I am very thankful that for everybody that have replyed that want to help me, and im putting al the usefull reactions in through action but im not the best programmer thats why I ask for help, but its not true that im just sitting in my "comfort zone" and waiting until somebody does that job for me, I m trying very hard to learn and accomplishing things at my own but as you see it not always succeed thats why I ask for help on this forum Link to comment Share on other sites More sharing options...
Bert Posted February 22, 2014 Share Posted February 22, 2014 I want to create a function in the firefox it needs to simulate a few key combinations like :"ctrl+shift+b than 2x enter" I know how i can do this with the "sent " but I want use it in the firefox udf, so the key combinations will be focused on the firefox browser even when the window is not actieve (minimized, running in the background) could somebody please help, I think allot of other autoit users would be very glad with this new function HI I want to press a few keys in firefox The keys: ctrl+shift+B (get in Library window (Bookmarks)) then 2xEnter How do i do this? (or is there a other way to do this?) Seems like the same to me. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Arclite86 Posted February 22, 2014 Author Share Posted February 22, 2014 (edited) Seems like the same to me. In the first example of "Arclite86, on 21 Feb 2014 - 8:05 PM, said:" I want to create a function in the firefox it needs to simulate a few key combinationslike :"ctrl+shift+b than 2x enter" I know how i can do this with the "sent " but I want use it in the firefox udf, so the key combinations will be focused on the firefox browser even when the window is not actieve (minimized, running in the background) could somebody please help,I think allot of other autoit users would be very glad with this new function I am asking how I can create a new function in the Firefox UDF script In the second example"Arclite86, on 19 Feb 2014 - 4:59 PM, said:" HI I want to press a few keys in firefoxThe keys: ctrl+shift+B (get in Library window (Bookmarks)) then 2xEnterHow do i do this?(or is there a other way to do this?) I am asking about the "sent" function Again 2 different questions. Edited February 22, 2014 by Arclite86 Link to comment Share on other sites More sharing options...
Bert Posted February 22, 2014 Share Posted February 22, 2014 In the first example of "Arclite86, on 21 Feb 2014 - 8:05 PM, said:" I am asking how I can create a new function in the Firefox UDF script In the second example"Arclite86, on 19 Feb 2014 - 4:59 PM, said:" I am asking about the "sent" function Again 2 different questions. Again, it looks the same to me and to other people. And we will keep telling you the same answer. Read what we told you already and follow what we told you if you want to solve your problem. Complaining about "I'm asking different questions" is wasting our time. You have been told what to do. It walks like a duck, quacks like a duck and swims like a duck. You can say it is an elephant all you want. To us - It is a duck. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Arclite86 Posted February 22, 2014 Author Share Posted February 22, 2014 Thats I use the same example in all of my question doesn't mean its the same question You have been told what to do. I have never had a answer on: how I can create a new UDF function That what the title of my thread says Link to comment Share on other sites More sharing options...
Developers Jos Posted February 22, 2014 Developers Share Posted February 22, 2014 Thats I use the same example in all of my question doesn't mean its the same question I have never had a answer on: how I can create a new UDF function That what the title of my thread says This question is too generic as the answer really is that when you write a Func---EndFunc you created your own UserDefinedFunction. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Arclite86 Posted February 22, 2014 Author Share Posted February 22, 2014 This question is too generic as the answer really is that when you write a Func---EndFunc you created your own UserDefinedFunction. Jos Ok, I want to simulate a few key for example: "ctrl+shift+B than 2x enter" But I have no idea how to start and make it run I have looked in UDF but it still confusing could somebody or you please help me with this. Like I said earlier this could be very usefull for allot of members not only me Link to comment Share on other sites More sharing options...
water Posted February 22, 2014 Share Posted February 22, 2014 I think a good description about UDFs (naming, documentation etc.) can be found in the wiki. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now