Exetools  

Go Back   Exetools > General > Source Code

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2021, 00:13
countryboy countryboy is offline
Family
 
Join Date: Sep 2021
Location: in the country
Posts: 38
Rept. Given: 0
Rept. Rcvd 34 Times in 17 Posts
Thanks Given: 40
Thanks Rcvd at 181 Times in 36 Posts
countryboy Reputation: 34
Smile AutoIt ... Lumion 8 Automation Script

AutoIt ... Lumion 8 Automation Script

A BLAST FROM THE PAST : Links for My Lumion 8 Automation was Re-Posted ...

Maybe someone my be Interested in a Tutorial : How to write Script for Autoit ..

EASY TO UNDERSTAND IMAGES :
Lumion8_Automation_Script : Image
https://i.imgur.com/PDurWSo.jpg

Lumion8_Automation-Window Image
https://i.imgur.com/TcpVux2.jpg

AutoIt Lumion 8 Automation Script : by Countryboy
Automatically inserts Emergency Activation Code, and Clicks the Button
Code:
https://mir.cr/00XK9ZSV
Password : countryboy
Lumion 8 had a bug : Emergency Activation code would overflow the Buffer causing ACTIVATION ...
The script Automated the Pain in the A** Copy - Paste Entry of Activation code on every Program Start ...

Release Post - INFORMATION :
Quote:
This Program is for the Folks with bad Internet Connections that have to use an Emergency Activation Code to use Lumion ! Hope this helps.

Automatically inserts Emergency Activation Code, and Clicks the Button. Screwed up Quit [x] Button Replaced with NEW : Shiny Red [X] Quit Toolbar Button.

NOTE: False Positive ! May have to add exception if flagged by some Virus programs. Autoit is easy to use, and some bad guys use it to create spyware and malware.

DEFAULT : Activation Code... Loader uses Emergency Activation Code !
Problems only: To use a different Activation Code : copy-paste to a Text File Named ( License.txt ) and place in same Folder as the Lumion Automation Loader.

English Keyboard only: ( Ctrl and V ) keys used to Paste Code into the Code Box. To change to another Keyboard Language: Edit Script Provided, and recompile with Autoit. It's Free, and Easy to use. See Read Me.txt
To change to a non English keyboard change the keys inside "{CTRLDOWN}v{CTRLUP}" at the very top of the page : $CopyPasteKeys = "{CTRLDOWN}v{CTRLUP}"

It has been many years since I used Autoit, but I have included the Script to Create the Loader. It is well documented, and every Instruction is explained. You can view the Script with Notepad if no Autoit.

DOWNLOAD : Autoit & Script EditorINFORMATION: UPDATE TO VERSION 3.2 to Fix Windows 8, and 10 problems.

1. 45 seconds = Max Wait Time for QWidget to be created, and exist. This is time from program Start to Mouse moving to Screen center, and clicking on Desktop to set focus = Spinning circle, and (Not Responding) displayed in Title Bar.
2. Changed: If Lumion Window Exists check from CLASS to Title. NOTE: Partial Title match may find other open Windows with Lumion in name.
3. If Window exists : Program waits 10 seconds Max for it to become active, and mouse clicks again to set Focus then Program enters a loop, Checking every second for the Emergency Activation Window to become Active, and appear.
4. 90 seconds = Max wait for Activation Window to appear. If Window doesn't appear, Program displays Error message, and Quits.

NOTE: Spinning circle with (Not Responding) message top Left corner due to clicking screen for Window Focus to keep program Loading.
Watch mouse return to screen center after performing tasks as an indication of what is happening.
If problem with "Window Doesn't Exist" message displayed: A version that doesn't check if Window exists in TEST VERSION FOLDER.

Recommend : Don't create License.txt unless there is problem with default Activation Code already included in the Loader.
Recommend : Don't click Mouse, or Keyboard keys while loader is loading Lumion, sit back and watch.
Recommend : Log in as Administrator, Right Click, and select run as Administrator. NOTE: Click Icon, Click on Properties, Select run as Administrator, and you don't have to Right click every time.

VERSION 3.2 : Now Works on Windows 7, 8, and 10. If you like the program then consider buying it to help support development.
Autoit can be a little Squarely sometimes on some computers, and I Hope the Lumion 8 Automation Loader works for everyone !

Have a great day, countryboy


AutoIt ... Lumion 8 Automation Script
Quote:
#Obfuscator_Parameters=/mergeonly
#include
#include
#include
#AutoIt3Wrapper_icon=countryboy.ico
#NoTrayIcon
; Following added for version 3
Opt("WinDetectHiddenText", 1) ; 0=don't detect, 1=do detect
Opt("WinSearchChildren", 1) ; 0=no, 1=search children also
Opt("WinTextMatchMode", 1) ; 1=complete, 2=quick
Opt("WinTitleMatchMode", 4) ; 1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

Global $hLumwnd = NULL ; Handle for the Main Lumion Window
Global $hwnd = NULL ; QWidget's handle

Global $aPos[4] ; make space for 4 elements.
$aPos[1] = 1 ; Window size and Position array
$aPos[2] = 1
$aPos[2] = 301
$aPos[3] = 480

Global $hCodeBox = NULL ; QWidget's Code Box
Global $QuitWin = NULL ; Global $QuitWin : Toolbar Window for Toolbar Quit [X] Button
Global $Button_Exit = NULL ; Global Handle for the Shiny Red Toolbar Quit Button [X]

;********************************************************* LUMION 8 Automation LOADER by countryboy **********************************************************

; TO USE A DIFFERENT ACTIVATION CODE: Copy-Paste code into a text File Named: ( License.txt ), and place it in the Lumion Folder with the Automation Loader.

; START OF CODE FOR LUMION 8 Automation LOADER by countryboy
; QUICK DONE SCRIPT: Haven't used Autoit for a very long time, and Script could probally be improved, as I mainly use Pascal, C++, and Assembly.
; Other Programs used to Help Create this Script by gating Window CLASS, Size, Control CLASS, Size, and Information: ( WinLister v1.13 ), and Autoit's ( Au3Info_x64 ) Window info tool.


RunLumion() ; Call the Run Lumion Function below

Func RunLumion()
; START OF FLUNCTION RunLumion() CONSTANTS AND VARIABLES

$CopyPasteKeys = "{CTRLDOWN}v{CTRLUP}" ; Copy-Paste - Keys for English KEYBOARD - CHANGE FOR NON ENGLISH KEYBOARD.

; DEFAUT ACTIVATION CODE : including CR = Carriage Return, LF = line Feed
$ActCode ="B49BCE7FA813FB0B162E048E6B8BB6112568C6A314512D5847 2D95EA83FFAD9EB29366535B8DAF372F4F2D18F97CB9DE" & @CRLF & "F0B8ACC456246209C0DEF8A456E96EB51583A79DF2E9390600 CD7471D0F655D4" & @CRLF & "63 0F 10 00 00 08 02 00 09 20 80 00 FF FB 8B 17"& @CRLF

Global $ActBox_MaxWait = 60 ; Maximum Wait for Emergency Activation Code Box to Appear in seconds + default 60 for Version 3

$ActBox_MaxWait_Msg = "Emergency Activation Code Box failed to appear !" & @CRLF & @CRLF & "Is Internet Activation check Blocked in Host File ?"
$NoLumionWindow = "Lumion Window does not exist !"
$WrongFolderMsg = "Loader must be in Folder with Lumion to work !"
; ---- Below Added for Win 10 version 3 Errors.
$BadCodeBoxPos = "Invalid CodeBox Position"
$BadChkActBoxPos = "Invalid Check Activation Button Position"

if not fileexists(@ScriptDir & "\Lumion.exe") Then ; "Loader must be in Folder with Lumion to work !"
MsgBox($MB_SYSTEMMODAL,"Lumion 8 Loader", $WrongFolderMsg) ; SHOW ERROR MESSAGE
Exit ; Quit the Loader Program
endif

ProcessClose ( "Lumion.exe" ) ; Kill another Instance if already running, or not responding, and hung in memory
Sleep(2000) ; Wait a couple of seconds for Kill Process

Run(@ScriptDir & "\Lumion.exe" ) ; START LUMION 8 : As the Loader should be in same Folder as Lumion.

; Folks using Windows 10 report no Lumion Window : Increase Wait Time from 10 seconds to 40 seconds for Qwidget to load. Is Win 10 Slower, or users computer ?

WinWait("[CLASS:QWidget]", "", 45) ; Changed Wait by QWidget in CodeBox Control's Child Window: from 10 seconds 45 for it to load

MouseMove(@DesktopWidth / 2,@DesktopHeight / 2) ; Center the Mouse on the Desktop
MouseClick("left",@DesktopWidth / 2,@DesktopHeight / 2) ; and Click to set Focus:

$hLumwnd = WinGetHandle("Lumion 8","") ; Get Handle from Windows Title: Top Left corner
; Changed QWidget to START folks with Win 10 had Problems as QWidget slow load.
If WinExists($hLumwnd,"" ) Then ; Test if the window exists, or display Message : Window not Found, and Quit.
$hwnd = WinGetHandle("[CLASS:QWidget]","") ; Get QWidget's Handle as it exists, but not Active yet.
if $hwnd <> 0 then $aPos = WinGetPos($hwnd) ; Windows Position & Size: $aPos[0] = x, $aPos[1] = y, $aPos[2] = Width, $aPos[3] = Height
$hwnd = WinWaitActive("[CLASS:QWidget]", "",10) ; Wait 10 seconds for QWidget to load, finish load wait in While loop at 1 second per loop.
if $hLumwnd <> 0 then WinSetState($hLumwnd, "", @SW_MAXIMIZE) ; Make sure LUMION WINDOW is Maximized
MouseClick("left",@DesktopWidth / 2,@DesktopHeight / 2) ; Click in center of Desktop to set Focus

; WAIT FOR Code Box Control to be Loaded : Go Into a Loop & Check Size
; Control has no Class Name, No information, and only way to know when it's loaded is Check Control SIZE: height = 20, Width = 200 pixels
; Do a While loop, Check if Handles are good, and get size - Loop until Emergency Activation Code Box size is found, or Max Wait exceded.

$aPos[3] = 480 ; INITALIZE the WHILE LOOP VARIABLES to max size: ... to ... MAKE the LOOP RUN !
$aPos[2] = 301 ; Check Child Window size: Is Height greater than 40, or Width greater than 300
$i = 0 ; Loop Counter for $ActBox_MaxWait, 1 loop = 1 second wait time

While $aPos[3] > 40 or $aPos[2] > 300 ; Control height = 20 - less than 40, Width = 200 - less than 300 OR wrong size
$hwnd = WinWaitActive("[CLASS:QWidget]", "",1) ; QWidget : CodeBox's Child Window - wait 1 second on each loop if not Active
if $hwnd <> 0 then ; If good Handle not equal 0 then get $hCodeBox's Handle using ControlGetHandle
$hCodeBox = ControlGetHandle("[CLASS:QWidget]","","") ; GET Control CodeBox Handle from QWidget Child Window handle
if (($hCodeBox <> 0) & not @error) then ; If got a good Control Handle with no error then get CodeBox Control Size.
WinActivate($hCodeBox) ; Activate code box: Check if Height less than 40, and Width less than 300
ControlFocus($hCodeBox, "", "") ; Set Focus on CodeBox control
$aPos = WinGetPos($hCodeBox) ; Get position, and Size to Check if CodeBox found. If found exit at loop top.
endif
endif
$i = $i + 1 ; Increment the Max Wait Loop Counter:
if $i > $ActBox_MaxWait Then ExitLoop ; If CodeBox not Displayed After Max Wait then Exit Loop
Wend

; CHECK IF : Emergency Activation Code Box Failed to appear - after max wait, OR it's a invalid size

If (($i > $ActBox_MaxWait) or ($aPos[3] > 40) or ($aPos[2] > 300) or ($aPos[3] < 1) or ($aPos[2] < 1)) Then
ProcessClose ( "Lumion.exe" ) ; KILL LUMION
MsgBox($MB_SYSTEMMODAL,"Lumion 8 Loader",$ActBox_MaxWait_Msg) ; SHOW ERROR MESSAGE
Exit ; Exit Program
Endif

if $hLumwnd <> 0 then WinSetState($hLumwnd, "", @SW_MAXIMIZE) ; Window is now Active : Make sure it's Maximized before pasting text
WinActivate("[CLASS:QWidget]") ; Focus it by : Activate QWidget CodeBox's Child Window
sleep(250) ; Wait 1/4 of a second after MAXIMIZE Winodow

; Copy DEFAULT ACTIVATION CODE to ClipBoard - If License.txt Exists then Use it's code

ClipPut("") ; CLEAR THE CLIPBOARD
if fileexists(@ScriptDir & "\License.txt") Then ; Check if License.txt File exists
$File = @ScriptDir & "\License.txt" ; If it does then get and use the Activation Code in License.txt
$Open = FileOpen($File, 0)
$Read = FileRead($Open)
ClipPut($Read) ; Put License.txt Act Code in the Clipboard
FileClose($Open)
else
ClipPut($ActCode) ; else USE DEFAULT ACTIVATION CODE - Put it in the Clipboard
endif

; PASTE CLIPBOARD INTO CodeBox Control useing Ctrl & V ENGLISH KEYBOARDS ONLY

if $hCodeBox <> 0 then WinActivate($hCodeBox) ; Activate CodeBox Control
if $hCodeBox <> 0 then ControlFocus($hCodeBox, "", "") ; and Set Focus on Control
sleep(250) ; Wait 1/4 of a second after seting focus before pasting text
if (($aPos[0] > 1) & ($aPos[1] > 1)) then ; Check if box position is invalid
MouseMove($aPos[0]+1,$aPos[1]+1) ; Move mouse to inside top Left Corner of CodeBox
MouseClick("left",$aPos[0]+1,$aPos[1]+1) ; Mouse Click inside CodeBox to set Focus
sleep(500) ; Wait 1/2 of a second
MouseClick("left",$aPos[0]+1,$aPos[1]+1) ; Mouse Click inside CodeBox to set Focus for Send: Sends to Window in focus
Else
MsgBox($MB_SYSTEMMODAL,"Lumion 8 Loader",$BadCodeBoxPos) ; SHOW ERROR MESSAGE
endif
sleep(500) ; Wait 1/2 a second

; CHANGE $CopyPasteKeys - VARIABLE AT TOP OF SCRIPT - FOR NON ENGLISH KEYBOARD - See (CTRLDOWN}v{CTRLUP) AT TOP OF SCRIPT

Send($CopyPasteKeys) ; PASTE CLIPBOARD USING KEYBOARD KEYS Ctrl and V
; ControlSend Function didn't work, and Scrambles Act Code & converts case
; Send was unreliable sending TEXT to the control, it didn't work right,
; and ControlSetText doesn't work at all.

; CLICK ON CHECK ACTIVATION BUTTON - Click at 4 Different Positions in case of users different SCREEN SIZES
; CHECK ACTIVATION BUTTON: No Name, or Info as to Position, but on Same Line as CodeBox, Use CodeBox Position + Width of CodeBox + 40 Pixels

Sleep(500) ; Wait 1/2 second for paste text to finish before clicking on button
if (($aPos[0] > 1) or ($aPos[1] > 1) or ($aPos[2] > 1)) then ; Check if box position is invalid
For $j = 40 To 85 Step +15 ; Click 4 times ( Control Start + Width + J ) Loop value = 40, 55, 70, 85
MouseMove($aPos[0] + $aPos[2] + $j ,$aPos[1]) ; Move mouse to Click on the "Check Activation Code Button"
MouseClick("left",$aPos[0] + $aPos[2] + $j ,$aPos[1]) ; Click Button - starting at 40 Pixels right of END OF ACTIVATION CODE BOX
MouseDown("left") ; Left mouse Button pressed - use alternate methods to click just in case
MouseUp("left") ; Left mouse Button up
Next
Else
MsgBox($MB_SYSTEMMODAL,"Lumion 8 Loader",$BadChkActBoxPos) ; SHOW ERROR MESSAGE
endif

; DONE : Exit Function, and GO BELOW - TO CREATE THE NEW [X] QUIT BUTTON

Else
MsgBox($MB_SYSTEMMODAL,"Lumion 8 Loader",$NoLumionWindow) ; SHOW ERROR MESSAGE
ProcessClose ( "Lumion.exe" ) ; KILL LUMION, AND EXIT
Exit ; Quit the Loader Program
EndIf
EndFunc ;==>RunLumion ; END OF: RunLumion FUNCTION....


; CREATE NEW [X] QUIT BUTTON, KEEP IT POSITIONED, AND WAIT FOX [X] CLICK
; Create a Toolbar Window with a shiny Red [X] Button, Lock it's position to the LUMION WINDOW, and Disable Original screwed up Lumion [x] Quit Button

$hLumwnd = WinGetHandle("Lumion Pro 8.0") ; Get Handle for Win Title: "Lumion 8.0" CLASS = START
if $hLumwnd <> 0 then $aPos = WinGetPos($hLumwnd) ; Get Lumion Window position and size

Create_QuitButton() ; Call the Create Quit Button Function below.

Func Create_QuitButton() ; FUNTION TO: Create the Shiny Red NEW [X] QuitButton

; REMOVED: POSSIBLE WIN 8 & 10 ERROR: $menu = DllCall("user32.dll - Don't remove the orgional [X] Button, also Handle may be Invalid, and divide by zero error of $aPos
; USED $aPos THAT WAS OBTAINED IN MAIN PART OF PROGRAM SEE ABOVE.

if $hLumwnd <> 0 then ; If good Lumion Window Handle
if (($aPos[2] > 1) & ($aPos[3] > 1)) then ; Check if not zero: POSSIBLE DIVIDE BY ZERO ERROR ON WIN 8 & 10
MouseMove($aPos[2] /2,$aPos[3] /2) ; Move to Center of Lumion Window
MouseClick("left",$aPos[2] /2,$aPos[3] /2) ; and Click in center of Window to set focus
endif
endif

; CREATE THE NEW [X] QUIT WINDOW: QuitWin on RIGHT TOP OF LUMION WINDOW without a Taskbar icon

$QuitWin = GUICreate("", 42, 16, $aPos[0] + $aPos[2]-56, $aPos[1] +7, BitOr($WS_BORDER, $WS_POPUP), $WS_EX_TOOLWINDOW)

If ($QuitWin <> 0) then ; Window Created, and good handle
GUISetBkColor(0xFFFFFF) ; Set Background color
$Button_Exit = GUICtrlCreateLabel("X", 0, 0, 42, 16, BitOR($SS_CENTER, $SS_CENTERIMAGE)) ; CREATE Shiny NEW Red [X] QUIT BUTTON IN QUIT WINDOW
if $Button_Exit <> 0 then
GUICtrlSetBkColor(-1, 0xDC0000) ; Set Button Background color
GUICtrlSetColor(-1, 0xF2F2F2) ; Shiny Bright Red Button
Else
MsgBox($MB_SYSTEMMODAL,"Lumion 8 Loader","Unable to Create Toolbar [X] Button")
endif
WinSetOnTop($QuitWin,"",1) ; KEEP BUTTON ON TOP OF LUMION WINDOW
GUISetState(@SW_SHOW) ; Show the Button
WinMove($QuitWin, "", $aPos[0] +$aPos[2]-56, $aPos[1]+7) ; Move Window: USE Maximized [X] Button Position
if $hLumwnd <> 0 then WinActivate($hLumwnd) ; Set Focus, or it stops loading
Else
MsgBox($MB_SYSTEMMODAL,"Lumion 8 Loader","Unable to Create Quit Button [X] Window")
EndIf

EndFunc ;==>CreateQuitButton() ; DONE: Go to MAIN, and wait for [X] Click...


; ------------------------------------------------------------------------- MAIN -------------------------------------------------------------------------
; GUIRegisterMsg: Didn't work with LUMION for Maintaing button position on Window when moved, and didn't want to use hook.dll = False Virus Positive
; Registering a $SC_CLOSE Handler for Lumion to Call the Quit Routine also didn't work. Lumion doesn't play well with others.
;--------------------------------- WAIT FOR X BUTTON CLICK TO QUIT - KEEP X BUTTON POSITION SET ON LUMION WINDOW ----------------------------

While 1 ; Continue til [X] Button is clicked
$aPos = WinGetPos($hLumwnd) ; Get Lumion Window Position and Size
$iState = WinGetState($hLumwnd) ; Check if Window is Maximized
if BitAND($iState, 32) Then ; Is it MAXIMIZED ?
WinMove($QuitWin, "", $aPos[0] + $aPos[2]-56, $aPos[1]+7) ; Set Quit Button to Maximized [X] Button Position
else
WinMove($QuitWin, "", $aPos[0] + $aPos[2]-52, $aPos[1]+1) ; Set Quit Button to Moving Window [X] Button Position
EndIf

$nMsg = GUIGetMsg() ; GET WINDOW MSG: CHECK IF [X] BUTTON CLICKED
Switch $nMsg
Case $GUI_EVENT_CLOSE
ProcessClose ( "Lumion.exe" ) ; QUIT: KILL LUMION, AND EXIT
Exit
Case $Button_Exit
ProcessClose ( "Lumion.exe" ) ; QUIT: KILL LUMION, AND EXIT
Exit
EndSwitch

WEnd

Last edited by countryboy; 09-26-2021 at 03:23.
Reply With Quote
The Following 3 Users Gave Reputation+1 to countryboy For This Useful Post:
Apuromafo (09-26-2021), chessgod101 (09-26-2021), papi (09-26-2021)
The Following 6 Users Say Thank You to countryboy For This Useful Post:
Apuromafo (09-26-2021), chessgod101 (09-26-2021), Hypnz (10-03-2021), Mendax47 (09-26-2021), papi (09-26-2021)
  #2  
Old 09-30-2021, 09:13
Asus Asus is offline
VIP
 
Join Date: Feb 2005
Posts: 585
Rept. Given: 112
Rept. Rcvd 27 Times in 13 Posts
Thanks Given: 127
Thanks Rcvd at 84 Times in 35 Posts
Asus Reputation: 28
How is solution for current version 11?
Reply With Quote
  #3  
Old 10-02-2021, 02:08
countryboy countryboy is offline
Family
 
Join Date: Sep 2021
Location: in the country
Posts: 38
Rept. Given: 0
Rept. Rcvd 34 Times in 17 Posts
Thanks Given: 40
Thanks Rcvd at 181 Times in 36 Posts
countryboy Reputation: 34
Smile requires Unlock key over the Internet

Quote:
Originally Posted by Asus View Post
How is solution for current version 11?
Hi Asus I wrote a Tutorial on How it was cracked a long time ago.

Ii is cracked by changing code to Insert the returned unlock key.
A Activated Version is required to get a valid key ...
It's a subscription Activation requiring Connect to their Server, and receiving the unlock key over the Internet.

The group doing the cracking doesn't release a crack until it's a version ahead.

Have a great day, countryboy
Reply With Quote
The Following User Says Thank You to countryboy For This Useful Post:
Hypnz (10-03-2021)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autoit - Close TCP Connection By ProcessName Max Source Code 1 07-03-2016 12:35


All times are GMT +8. The time now is 18:41.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )