Jump to content

OLD code help please


Lapo
 Share

Recommended Posts

What exactly is your problem?

???

#)

EDIT:

OK. I see your problem. I ran your code and my computer crashed due to too many notepads...

EDIT 2:

Ahh... thanks to that crash i spotted the problem to your script:

#include <GUIConstants.au3>
GUICreate ( "", 450, 300)
;$myPic = GuiSetControl("pic", "C:\PROGRA~1\AUTOIT3\EXTRA\DDD.JPG", 0, 0, 450, 300)

$not = GUICtrlCreateButton("&Notepad", 10, 30, 100)

$war = GUICtrlCreateButton("&Clip", 10, 60, 100)
$war01 = GUICtrlCreateButton ("Calc", 10, 90, 100) 
$war02 = GUICtrlCreateButton("Wordpad", 10, 120, 100)
$war03 = GUICtrlCreateButton("ACDSEE", 10, 150, 100)
$war04 = GUICtrlCreateButton("NERO", 10, 180, 100)
$war05 = GUICtrlCreateButton("AutoIT3 Help", 10, 210, 100)
;GUISetControlEx(-1,$GUI_FOCUS)
$war06 = GUICtrlCreateButton("&Programmi", 10, 240, 100)

$war07 = GUICtrlCreateButton("&Autoit3", 165, 30, 100)
$war08 = GUICtrlCreateButton("&Desk", 165, 60, 100)
$war09 = GUICtrlCreateButton ("Windows", 165, 90, 100)
$war10 = GUICtrlCreateButton("OE folder", 165, 120, 100)
$war11 = GUICtrlCreateButton("Sysinfo104", 165, 150, 100)
$war12 = GUICtrlCreateButton("&Links", 165, 180, 100)
$war13 = GUICtrlCreateButton("&RegSeeker", 165, 210, 100)
$war14 = GUICtrlCreateButton("Regedit", 165, 240, 100)

$war15 = GUICtrlCreateButton("&Tv Guide", 310, 30, 100)

$war16 = GUICtrlCreateButton("InRiga", 310, 60, 100)
$war17 = GUICtrlCreateButton ("&UM", 310, 90, 100)
$war18 = GUICtrlCreateButton("&SAT", 310, 120, 100)
$war19 = GUICtrlCreateButton("button", 310, 150, 100)
$war20 = GUICtrlCreateButton("Api_Guide", 310, 180, 100)
$war21 = GUICtrlCreateButton("&OpenCloseCD", 310, 210, 100)
$war22 = GUICtrlCreateButton("&MORE", 310, 240, 100)

;;;;;;;;;;;GuiShow()
GUISetState () 
;;;;;;;;;;;;;;GuiWaitClose()


While $msg <> $GUI_EVENT_CLOSE
$msg = GuiGetMsg()
if $not = $msg then Run("notepad.exe")
if $war01 =$msg then Run("calc.exe")
if $war02 =$msg then Run("C:\PROGRA~1\ACCESS~1\WORDPAD.EXE")
if $war03 =$msg then Run("C:\PROGRA~1\ACDSEE32\ACDSEE32.EXE")
if $war04 =$msg then Run("C:\Programmi\Ahead\Nero\nero.exe")
if $war05 =$msg then Run("C:\WINDOWS\HH.EXE C:\PROGRA~1\AUTOIT3\AUTOIT.CHM")
if $war06 =$msg then Run('"explorer.exe" "c:\programmi"',"",3)
if $war07 =$msg then Run('"explorer.exe" "c:\programmi\autoit3"',"",3)
if $war08 =$msg then Run('"explorer.exe" "C:\DOC\SPARE\DESK"',"",3)
if $war09 =$msg then Run('"explorer.exe" "C:\WINDOWS"',"",3)
if $war10 =$msg then Run('"explorer.exe" "C:\PROGRA~1\PROKEY~1\TWORKSAS\SCRIPTS\OEVISU~1"',"",3)
if $war11 =$msg then Run("C:\Doc\spare\Desk\claspak\Proprieta tb Library\Fisher\TypeLibraryExplorer.exe","C:\WINDOWS\SYSTEM")
if $war12 =$msg then Run('"explorer.exe" "C:\Doc\spare\Links"',"",3)
if $war13 =$msg then Run("C:\PROGRA~1\REGSEE~1\REGSEE~1.EXE")
if $war14 =$msg then Run("Regedit.exe")
if $war15 =$msg then Run('"explorer.exe" "C:\WINDOWS\DESKTOP\!1210~1\TVGUID~1"',"",3)
if $war16 =$msg then Run("C:\PROGRA~1\AUTOIT3\EXTRA\INRIGA.EXE")
if $war17 =$msg then Run("C:\PROGRA~1\AUTOIT3\AUTOIT3.EXE C:\PROGRA~1\UM\XXXX_L~1.AU3")
if $war18 =$msg then Run("C:\PROGRA~1\AUTOIT3\AUTOIT3.EXE C:\Programmi\Autoit3\Extra\Sat.au3")
if $war19 =$msg then Run("C:\WINDOWS\notepad.exe C:\DOCUME~1\SPICE.LOG")
if $war20 =$msg then Run("C:\Programmi\Microsoft Windows Script\API-Guide\API-Guide.exe")
if $war21 =$msg then Run("C:\PROGRA~1\PROKEY~1\TWORKSAS\SCRIPTS\OEVISU~1\OPENCL~1.EXE")
if $war22 =$msg then Run("C:\PROGRA~1\AUTOIT3\AUTOIT3.EXE C:\Programmi\Autoit3\Extra\More.au3")
Wend

Next time warn people before asking for help on such code!

#)

Edited by nfwu
Link to comment
Share on other sites

so it's OK .. Thank you

#include <GUIConstants.au3>

GUICreate ( "", 450, 300)

;$myPic = GuiSetControl("pic", "C:\PROGRA~1\AUTOIT3\EXTRA\DDD.JPG", 0, 0, 450, 300)

$not = GUICtrlCreateButton("&Notepad", 10, 30, 100)

$war = GUICtrlCreateButton("&Clip", 10, 60, 100)

$war01 = GUICtrlCreateButton ("Calc", 10, 90, 100)

$war02 = GUICtrlCreateButton("Wordpad", 10, 120, 100)

$war03 = GUICtrlCreateButton("ACDSEE", 10, 150, 100)

$war04 = GUICtrlCreateButton("NERO", 10, 180, 100)

$war05 = GUICtrlCreateButton("AutoIT3 Help", 10, 210, 100)

;GUISetControlEx(-1,$GUI_FOCUS)

$war06 = GUICtrlCreateButton("&Programmi", 10, 240, 100)

$war07 = GUICtrlCreateButton("&Autoit3", 165, 30, 100)

$war08 = GUICtrlCreateButton("&Desk", 165, 60, 100)

$war09 = GUICtrlCreateButton ("Windows", 165, 90, 100)

$war10 = GUICtrlCreateButton("OE folder", 165, 120, 100)

$war11 = GUICtrlCreateButton("Sysinfo104", 165, 150, 100)

$war12 = GUICtrlCreateButton("&Links", 165, 180, 100)

$war13 = GUICtrlCreateButton("&RegSeeker", 165, 210, 100)

$war14 = GUICtrlCreateButton("Regedit", 165, 240, 100)

$war15 = GUICtrlCreateButton("&Tv Guide", 310, 30, 100)

$war16 = GUICtrlCreateButton("InRiga", 310, 60, 100)

$war17 = GUICtrlCreateButton ("&UM", 310, 90, 100)

$war18 = GUICtrlCreateButton("&SAT", 310, 120, 100)

$war19 = GUICtrlCreateButton("button", 310, 150, 100)

$war20 = GUICtrlCreateButton("Api_Guide", 310, 180, 100)

$war21 = GUICtrlCreateButton("&OpenCloseCD", 310, 210, 100)

$war22 = GUICtrlCreateButton("&MORE", 310, 240, 100)

;;;;;;;;;;;GuiShow()

GUISetState ()

;;;;;;;;;;;;;;GuiWaitClose()

While 1

$msg = GuiGetMsg()

if $not = $msg then Run("notepad.exe")

if $war01 =$msg then Run("calc.exe")

if $war02 =$msg then Run("C:\PROGRA~1\ACCESS~1\WORDPAD.EXE")

if $war03 =$msg then Run("C:\PROGRA~1\ACDSEE32\ACDSEE32.EXE")

if $war04 =$msg then Run("C:\Programmi\Ahead\Nero\nero.exe")

if $war05 =$msg then Run("C:\WINDOWS\HH.EXE C:\PROGRA~1\AUTOIT3\AUTOIT.CHM")

if $war06 =$msg then Run('"explorer.exe" "c:\programmi"',"",3)

if $war07 =$msg then Run('"explorer.exe" "c:\programmi\autoit3"',"",3)

if $war08 =$msg then Run('"explorer.exe" "C:\DOC\SPARE\DESK"',"",3)

if $war09 =$msg then Run('"explorer.exe" "C:\WINDOWS"',"",3)

if $war10 =$msg then Run('"explorer.exe" "C:\PROGRA~1\PROKEY~1\TWORKSAS\SCRIPTS\OEVISU~1"',"",3)

if $war11 =$msg then Run("C:\Doc\spare\Desk\claspak\Proprieta tb Library\Fisher\TypeLibraryExplorer.exe","C:\WINDOWS\SYSTEM")

if $war12 =$msg then Run('"explorer.exe" "C:\Doc\spare\Links"',"",3)

if $war13 =$msg then Run("C:\PROGRA~1\REGSEE~1\REGSEE~1.EXE")

if $war14 =$msg then Run("Regedit.exe")

if $war15 =$msg then Run('"explorer.exe" "C:\WINDOWS\DESKTOP\!1210~1\TVGUID~1"',"",3)

if $war16 =$msg then Run("C:\PROGRA~1\AUTOIT3\EXTRA\INRIGA.EXE")

if $war17 =$msg then Run("C:\PROGRA~1\AUTOIT3\AUTOIT3.EXE C:\PROGRA~1\UM\XXXX_L~1.AU3")

if $war18 =$msg then Run("C:\PROGRA~1\AUTOIT3\AUTOIT3.EXE C:\Programmi\Autoit3\Extra\Sat.au3")

if $war19 =$msg then Run("C:\WINDOWS\notepad.exe C:\DOCUME~1\SPICE.LOG")

if $war20 =$msg then Run("C:\Programmi\Microsoft Windows Script\API-Guide\API-Guide.exe")

if $war21 =$msg then Run("C:\PROGRA~1\PROKEY~1\TWORKSAS\SCRIPTS\OEVISU~1\OPENCL~1.EXE")

if $war22 =$msg then Run("C:\PROGRA~1\AUTOIT3\AUTOIT3.EXE C:\Programmi\Autoit3\Extra\More.au3")

if $msg = $GUI_EVENT_CLOSE then exit

Wend

Link to comment
Share on other sites

you probably did not copy this important part at the top

#include <GUIConstants.au3>

8)

You are right ... I have hardcoded it for the moment :

#include "C:\Programmi\autoit-v3.1.1.111\include\GUIConstants.au3"

Link to comment
Share on other sites

You are right ... I have hardcoded it for the moment :

#include "C:\Programmi\autoit-v3.1.1.111\include\GUIConstants.au3"

It worked once and now the same error

Have you try it ?

Is my above solution >>> "so it's OK .. Thank you" good and valid ?

Link to comment
Share on other sites

most of them work for me...

but, some have different directories than mine and they dont work unless i correct the directory/file

8)

Yes ok but vou have NOT the

While $msg <> $GUI_EVENT_CLOSE

variable NOT declared

error .. wath version have vou ? I have 3, 1, 1, 111

You are the autor of IE.au3 can i have the inner text of a web page ?

like VBS >>> :

x = TextFromHTML("http://google.com")

'WScript.Echo x

Function TextFromHTML(URL)

set ie = createobject("internetexplorer.application")

ie.navigate URL

do until ie.readystate = 4 : wscript.sleep 10: loop

TextFromHTML = ie.document.body.innerText

ie.quit

End Function

filename = "C:\WINDOWS\DESKTOP\!1210~1\TVGUID~1\SPARE\INXTC.TXT"

Set fso = CreateObject("Scripting.FileSystemObject")

Set newf = fso.createtextfile(filename)

newf.WriteLine x

Link to comment
Share on other sites

Ok thanks ... can I also use this code ? :

#include <GUIConstants.au3>

GUICreate ( "", 450, 300)

;$myPic = GuiSetControl("pic", "C:\PROGRA~1\AUTOIT3\EXTRA\DDD.JPG", 0, 0, 450, 300)

$not = GUICtrlCreateButton("&Notepad", 10, 30, 100)

$war = GUICtrlCreateButton("&Clip", 10, 60, 100)

$war01 = GUICtrlCreateButton ("Calc", 10, 90, 100)

$war02 = GUICtrlCreateButton("Wordpad", 10, 120, 100)

$war03 = GUICtrlCreateButton("ACDSEE", 10, 150, 100)

$war04 = GUICtrlCreateButton("NERO", 10, 180, 100)

$war05 = GUICtrlCreateButton("AutoIT3 Help", 10, 210, 100)

;GUISetControlEx(-1,$GUI_FOCUS)

$war06 = GUICtrlCreateButton("&Programmi", 10, 240, 100)

$war07 = GUICtrlCreateButton("&Autoit3", 165, 30, 100)

$war08 = GUICtrlCreateButton("&Desk", 165, 60, 100)

$war09 = GUICtrlCreateButton ("Windows", 165, 90, 100)

$war10 = GUICtrlCreateButton("OE folder", 165, 120, 100)

$war11 = GUICtrlCreateButton("Sysinfo104", 165, 150, 100)

$war12 = GUICtrlCreateButton("&Links", 165, 180, 100)

$war13 = GUICtrlCreateButton("&RegSeeker", 165, 210, 100)

$war14 = GUICtrlCreateButton("Regedit", 165, 240, 100)

$war15 = GUICtrlCreateButton("&Tv Guide", 310, 30, 100)

$war16 = GUICtrlCreateButton("InRiga", 310, 60, 100)

$war17 = GUICtrlCreateButton ("&UM", 310, 90, 100)

$war18 = GUICtrlCreateButton("&SAT", 310, 120, 100)

$war19 = GUICtrlCreateButton("button", 310, 150, 100)

$war20 = GUICtrlCreateButton("Api_Guide", 310, 180, 100)

$war21 = GUICtrlCreateButton("&OpenCloseCD", 310, 210, 100)

$war22 = GUICtrlCreateButton("&MORE", 310, 240, 100)

;;;;;;;;;;;GuiShow()

GUISetState ()

;;;;;;;;;;;;;;GuiWaitClose()

While 1

$msg = GuiGetMsg()

if $not = $msg then Run("notepad.exe")

if $war01 =$msg then Run("calc.exe")

if $war02 =$msg then Run("C:\PROGRA~1\ACCESS~1\WORDPAD.EXE")

if $war03 =$msg then Run("C:\PROGRA~1\ACDSEE32\ACDSEE32.EXE")

if $war04 =$msg then Run("C:\Programmi\Ahead\Nero\nero.exe")

if $war05 =$msg then Run("C:\WINDOWS\HH.EXE C:\PROGRA~1\AUTOIT3\AUTOIT.CHM")

if $war06 =$msg then Run('"explorer.exe" "c:\programmi"',"",3)

if $war07 =$msg then Run('"explorer.exe" "c:\programmi\autoit3"',"",3)

if $war08 =$msg then Run('"explorer.exe" "C:\DOC\SPARE\DESK"',"",3)

if $war09 =$msg then Run('"explorer.exe" "C:\WINDOWS"',"",3)

if $war10 =$msg then Run('"explorer.exe" "C:\PROGRA~1\PROKEY~1\TWORKSAS\SCRIPTS\OEVISU~1"',"",3)

if $war11 =$msg then Run("C:\Doc\spare\Desk\claspak\Proprieta tb Library\Fisher\TypeLibraryExplorer.exe","C:\WINDOWS\SYSTEM")

if $war12 =$msg then Run('"explorer.exe" "C:\Doc\spare\Links"',"",3)

if $war13 =$msg then Run("C:\PROGRA~1\REGSEE~1\REGSEE~1.EXE")

if $war14 =$msg then Run("Regedit.exe")

if $war15 =$msg then Run('"explorer.exe" "C:\WINDOWS\DESKTOP\!1210~1\TVGUID~1"',"",3)

if $war16 =$msg then Run("C:\PROGRA~1\AUTOIT3\EXTRA\INRIGA.EXE")

if $war17 =$msg then Run("C:\PROGRA~1\AUTOIT3\AUTOIT3.EXE C:\PROGRA~1\UM\XXXX_L~1.AU3")

if $war18 =$msg then Run("C:\PROGRA~1\AUTOIT3\AUTOIT3.EXE C:\Programmi\Autoit3\Extra\Sat.au3")

if $war19 =$msg then Run("C:\WINDOWS\notepad.exe C:\DOCUME~1\SPICE.LOG")

if $war20 =$msg then Run("C:\Programmi\Microsoft Windows Script\API-Guide\API-Guide.exe")

if $war21 =$msg then Run("C:\PROGRA~1\PROKEY~1\TWORKSAS\SCRIPTS\OEVISU~1\OPENCL~1.EXE")

if $war22 =$msg then Run("C:\PROGRA~1\AUTOIT3\AUTOIT3.EXE C:\Programmi\Autoit3\Extra\More.au3")

if $msg = $GUI_EVENT_CLOSE then exit

Wend

Link to comment
Share on other sites

The IE-library5 gives an error

AUTOIT3 ha provocato un errore di pagina non valida nel

modulo USER.EXE in 0008:00004536.

Registri:

EAX=000241d8 CS=1797 EIP=00004536 EFLGS=00000246

EBX=00000000 SS=4127 ESP=00000002 EBP=006a0016

ECX=000241d8 DS=16c7 ESI=00024254 FS=0c3f

EDX=00000000 ES=16c7 EDI=000241d8 GS=3c4f

Byte all'indirizzo CS:EIP:

c8 04 00 00 66 57 66 33 db 66 8b 4e 06 66 8b 7e

Immagine dello stack:

17974438 000241d8 000241d8 00024254

may you simple post the code to retrieve the inner text of a web page thanks

Link to comment
Share on other sites

since you did try

YES but it's HTML try this *.VBS :

x = TextFromHTML("http://www.autoitscript.com/")

'WScript.Echo x

Function TextFromHTML(URL)

set ie = createobject("internetexplorer.application")

ie.navigate URL

do until ie.readystate = 4 : wscript.sleep 10: loop

TextFromHTML = ie.document.body.innerText

ie.quit

End Function

filename = "C:\test.txt"

Set fso = CreateObject("Scripting.FileSystemObject")

Set newf = fso.createtextfile(filename)

newf.WriteLine x

set oShell = CreateObject("WScript.Shell")

oShell.run"test.txt"

Edited by Lapo
Link to comment
Share on other sites

The Script i gave you above WILL get the HTML text and place it in notepad for you to View/Read/Save how you want

the objectcreate is what is inside the IE.au3 Builder and is failing on your system

8)

Ok ... if I have understand I do _IEBodyReadHTML($oIE) and then parse

the text my self for inner plain text ?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...