Sign in to follow this  
Followers 0
PhoenixXL

Auto in windows 7 not working in XP

5 posts in this topic

#1 ·  Posted (edited)

I made many applications in windows 7 and running them was very easy on my computer but after converting it to a standalone installer and running it on a xp version os i didnt ran

this is the code in windows 7

#NoTrayIcon
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=....abhishek.ico
#AutoIt3Wrapper_Outfile=Abhishek.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_Run_Tidy=y
#AutoIt3Wrapper_Tidy_Stop_OnError=n
#AutoIt3Wrapper_Run_Obfuscator=y
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.6.1
Author:      myName

Script Function:
Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
Opt("MustDeclareVars", 1)
Global $x, $SSS
Global $H = @HOUR
Global $0 = "USM.exe"
Global $1 = "gta_sa.exe"
Global $2 = "MK-4.EXE"
Global $3 = "Hamsterball.exe"
Global $O = ProcessExists("DietOdin.exe")
Global $week = @WDAY
Global $wintitle = "Something"
_instance()


While 1
HotKeySet("^+#!g", "games")

Switch $H
Case 21 To 17
If ProcessExists("Close.exe") <> 0 Then
ProcessClose("Close.exe")
EndIf


Case 18 To 20

If ProcessExists("Close.exe") = 0 Then
Run("D:,Close.exe")
EndIf


Case 7 To 8

$x = ProcessExists("vlc.exe")
If $x = 0 Then
ShellExecute("F:songsN73 Music FilesNew folder", "", "", "open", @SW_MAXIMIZE)
WinWaitActive("New folder")
MouseClick("LEFT", 312, 345, 1, 1)
Send("^a", 0)
ShellExecute("vlc.exe", "", "D:VideoLANVLC", "open", @SW_MAXIMIZE)
WinWaitActive("[CLASS:QWidget]")
Send("#{RIGHT}")
Sleep(1000)
MouseClickDrag("LEFT", 348, 427, 1047, 430, 1)
WinSetState("[CLASS:QWidget]", "", @SW_HIDE)
WinKill("New folder")

EndIf

EndSwitch

If ProcessExists($0) Or ProcessExists($1) Or ProcessExists($2) Or ProcessExists($3) Then
WinClose("Games")

EndIf
WEnd

Func _instance()
If WinExists($wintitle) Then
Exit
EndIf
FileCopy(@ScriptFullPath, @StartupDir, 1)
FileCopy(@ScriptFullPath, @StartupCommonDir, 1)
RegWrite("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun", @ScriptName, "REG_SZ", @ScriptFullPath)
RegWrite("HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionRun", @ScriptName, "REG_SZ", @ScriptFullPath)
AutoItWinSetTitle($wintitle)
EndFunc   ;==>_instance

Func games()
$SSS = InputBox("Security Check", "Password Please", "", "*", 150, 120, 1250, 760)
Select
Case $SSS = "22447435"
ShellExecute("D:,Games")


Case $SSS = "apps"
Run("EXPLORER.exe")
WinWaitActive("Libraries")
Send("!D")
ShellExecute("D:,Apps")
Send("{ENTER}")

Case @error = 1

WinKill("Security Check")

Case Else
MsgBox(16, "", "Wrong Password")


EndSelect
EndFunc   ;==>games

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites



Could you please post this in an autoit snippet box next time?

Also, you have a winwaitactive command waiting for the explorer window to popup in libraries. windows XP doesnt have a libraries folder, it pops up in the user's documents, I think.

Other than that, I wouldnt have a clue as to why it wont run.

Check the code runs in both windows 7 and XP. Then check the executable runs in both. If the code doesnt run in XP, place consolewrite commands on a few of your lines to see where it crashes.

Share this post


Link to post
Share on other sites

<div>#NoTrayIcon</div><div>#region ;**** Directives created by AutoIt3Wrapper_GUI ****</div><div>#AutoIt3Wrapper_Icon=..\..\abhishek.ico</div><div>#AutoIt3Wrapper_Outfile=Abhishek.exe</div><div>#AutoIt3Wrapper_Compression=4</div><div>#AutoIt3Wrapper_Add_Constants=n</div><div>#AutoIt3Wrapper_Run_Tidy=y</div><div>#AutoIt3Wrapper_Tidy_Stop_OnError=n</div><div>#AutoIt3Wrapper_Run_Obfuscator=y</div><div>#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****</div><div>#cs ----------------------------------------------------------------------------</div><div><br></div><div>AutoIt Version: 3.3.6.1</div><div>Author:      myName</div><div><br></div><div>Script Function:</div><div>Template AutoIt script.</div><div><br></div><div>#ce ----------------------------------------------------------------------------</div><div><br></div><div>; Script Start - Add your code below here</div><div>Opt("MustDeclareVars", 1)</div><div>Global $x, $SSS</div><div>Global $H = @HOUR</div><div>Global $0 = "USM.exe"</div><div>Global $1 = "gta_sa.exe"</div><div>Global $2 = "MK-4.EXE"</div><div>Global $3 = "Hamsterball.exe"</div><div>Global $O = ProcessExists("DietOdin.exe")</div><div>Global $week = @WDAY</div><div>Global $wintitle = "Something"</div><div>_instance()</div><div><br></div><div><br></div><div>While 1</div><div>HotKeySet("^+#!g", "games")</div><div><br></div><div>Switch $H</div><div>Case 21 To 17</div><div>If ProcessExists("Close.exe") &lt;&gt; 0 Then</div><div>ProcessClose("Close.exe")</div><div>EndIf</div><div><br></div><div><br></div><div>Case 18 To 20</div><div><br></div><div>If ProcessExists("Close.exe") = 0 Then</div><div>Run("D:\,\Close.exe")</div><div>EndIf</div><div><br></div><div><br></div><div>Case 7 To 8</div><div><br></div><div>$x = ProcessExists("vlc.exe")</div><div>If $x = 0 Then</div><div>ShellExecute("F:\songs\N73 Music Files\New folder", "", "", "open", @SW_MAXIMIZE)</div><div>WinWaitActive("New folder")</div><div>MouseClick("LEFT", 312, 345, 1, 1)</div><div>Send("^a", 0)</div><div>ShellExecute("vlc.exe", "", "D:\VideoLAN\VLC\", "open", @SW_MAXIMIZE)</div><div>WinWaitActive("[CLASS:QWidget]")</div><div>Send("#{RIGHT}")</div><div>Sleep(1000)</div><div>MouseClickDrag("LEFT", 348, 427, 1047, 430, 1)</div><div>WinSetState("[CLASS:QWidget]", "", @SW_HIDE)</div><div>WinKill("New folder")</div><div><br></div><div>EndIf</div><div><br></div><div>EndSwitch</div><div><br></div><div>If ProcessExists($0) Or ProcessExists($1) Or ProcessExists($2) Or ProcessExists($3) Then</div><div>WinClose("Games")</div><div><br></div><div>EndIf</div><div>WEnd</div><div><br></div><div>Func _instance()</div><div>If WinExists($wintitle) Then</div><div>Exit</div><div>EndIf</div><div>FileCopy(@ScriptFullPath, @StartupDir, 1)</div><div>FileCopy(@ScriptFullPath, @StartupCommonDir, 1)</div><div>RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", @ScriptFullPath)</div><div>RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", @ScriptFullPath)</div><div>AutoItWinSetTitle($wintitle)</div><div>EndFunc   ;==&gt;_instance</div><div><br></div><div>Func games()</div><div>$SSS = InputBox("Security Check", "Password Please", "", "*", 150, 120, 1250, 760)</div><div>Select</div><div>Case $SSS = "22447435"</div><div>ShellExecute("D:\,\Games\")</div><div><br></div><div><br></div><div>Case $SSS = "apps"</div><div>Run("EXPLORER.exe")</div><div>WinWaitActive("Libraries")</div><div>Send("!D")</div><div>ShellExecute("D:\,\Apps\")</div><div>Send("{ENTER}")</div><div><br></div><div>Case @error = 1</div><div><br></div><div>WinKill("Security Check")</div><div><br></div><div>Case Else</div><div>MsgBox(16, "", "Wrong Password")</div><div><br></div><div><br></div><div>EndSelect</div><div>EndFunc   ;==&gt;games</div>

on running it on windows xp it says it is not a valid win32 application it crashes before starting therefore the console write option is not working


My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

I am having a X86 version os AND x64 version CPU but all the application which my computer run are 32bit therefore i don't what is causing the problem


My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

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