Sign in to follow this  
Followers 0
Mouse

Why wont this work?

6 posts in this topic

#1 ·  Posted (edited)

-edit-

Oops, i didnt mean to set the title to something that wasnt informing!

#include <IE.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Local $oIE = _IECreateEmbedded()
HotKeySet("{ENTER}", "GrabTranslateEnter")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 117, 27, 1112, 126, -1, BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
GUICtrlCreateObj($oIE, 32, 8, 33, 9)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
_IENavigate($oIE, "http://www.albinoblacksheep.com/text/aoler")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd

func GrabTranslateEnter()
$Test = WinGetHandle("Untitled - Notepad","")
$hDLL = DllOpen("user32.dll")
$GetText = ControlGetText($Test,"","Edit1")
;;;;;;;;;;;;;;;;;;;;;;;

Local $oQuery = _IEGetObjById($oIE, "translatethis")
_IEFormElementSetValue($oQuery, $GetText)
sleep(100)

$colTags = _IETagNameGetCollection($oIE, "input")
For $oTag In $colTags
; Might also work this way:
; If $oTag.value = "Release" Then
If _IEPropertyGet($oTag, "innertext") = "Translate!" Then
_IEAction($oTag, "click")
EndIf
Next


$Noob = _IEFormElementGetValue($oQuery)

sleep(100)
ControlHide($Test,"","Afx:00400000:2b")
ControlSetText($Test,"","Edit1",$Noob)
Sleep(100)
ControlShow($Test,"","Afx:00400000:2b")

endfunc

That right there, Theres a form that has a little webbrowser embedded into it.

That webrowser goes to a translator website.

Its suppose to grab the current text that inside of notepad, paste it into the first translate box on that webbrowser, press the Translate button, copy the results from the results box, and replace the text.

But its not working D:

i have no idea why... can someone help me fix this?

Edited by Mouse

Share this post


Link to post
Share on other sites



To edit the title go to the first post, click on Full Editor and change the title.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Unfortunately I can't test because the site is blocked here.

If you run your script from ScITE do you get any error messages in the output pane of SciTE?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Local $oQuery2 = _IEGetObjById($oIE, "translated")
    $Noob = _IEFormElementGetValue($oQuery2)
    MsgBox(0,'',$Noob)

if you need something else then tell which part of script isn't working, just saying "But its not working D:" will not do.


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Local $oQuery2 = _IEGetObjById($oIE, "translated")
    $Noob = _IEFormElementGetValue($oQuery2)
    MsgBox(0,'',$Noob)

if you need something else then tell which part of script isn't working, just saying "But its not working D:" will not do.

Thank you so much! Genius!

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

lol

Posted Image

Let Me Gaze Into My Crystal Ball tutorial is finally working:P

no problem but next time please do try to be more specific about what part isn't working ;)

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0