Remove All Ads from XDA

[APP][13/01/2011] UIFlex - Disable HTC Sense/SPB Mobile Shell/AnyUI.exe Automatically

422 posts
Thanks Meter: 71
By arealityfarbetween, Senior Member on 2nd December 2010, 06:46 PM
Post Reply Email Thread

UIFlex is a fork of StartProgWOSense with one major difference: It can function with any phone shell including, but not limited to; HTC Sense and SPB Mobile Shell. Thanks go to cyber-junkie for the initial idea and coding the excellent base that UIFlex has grown up from. Also to Mort for writing Mortscript, without whom none of this would have been possible!

In a nutshell, everybody loves a beautiful UI! Unfortunately beauty comes with a price-lots of our precious RAM! So, the goal of UIFlex is to allow you to run memory heavy programs without having to first disable your eye-candy laden shell, run the program and then re-enable your shell.

It has two modes of operation:
  • Background monitoring: The script can be configured to start when your device boots. In this mode, you define a set of programs and when UIFlex notices one it will disable your beautiful UI for you and re-enable it when the program exits.
  • QuickLaunch: This functionality is designed for programs that simply will not start (e.g. due to low memory) while the shell is running. A QuickLaunch script disables the shell first and then runs the program.


I have re-licensed the software under the GNU General Public License with a blessing from cyber-junkie. There are various reasons for this but the main one is that it ensures the software and your rights will always be protected. Basically, you are free to modify/redistribute/sell the software but it must always remain under the GPL.

Version and Release Info
The main release will be the cabinet installer file. Updates will usually be produced as zip files, to use the updates just unzip the files into your existing UIFlex folder, overwriting any existing files. Versions are numbered just like any good Open Source project:
  • The first number is the major version-features and compatibility generally won't change in a major version.
  • The second is the minor version-odd numbers are development for the next stable even number.
  • The third number is the release number.
  • If there is a fourth, it's a bugfix release number.
E.g. This program starts at 2.7.5, which means it's preparation for the stable release 2.8.0.

I give you UIFlex

Appreciate my work?

        - Fix synax error, missing comma.
	- Re-enabled setup wizard on first run
	- Minor tweak to background script
	- Minor bugfix for QuickLauncher's not restarting the UI
	when the background script isn't running
	- More work done on ExeTest()
	  > Now confirms what Exe to add even if only one found
	  > If cancel pressed in list, Input() dialog is shown
	- QuickLaunchers will no longer add scripts with no EXE
	- Included Language Translator
	  > Minor English language file update
	  > Language Files now stored in "language\UIFlexGUI"
	- Minor Background script tweak
	- Minor GUI update
	- Protected against setting timings to 0

	- Seperated Purely GUI functions into own file
	- ExeTest() rewritten
	  > Better support for chainlaunched programs
	  > Quicker to add programs to list
	- Added IsInArray() function
	  > Because InArray() never works past the first element for me
	  > SpinProtect() now uses this
	- GUI select file dialog remembers last location
	- Updated Translation: English
	- Background script updated in case Sense fails to start

	- Included control of script timings (main and spinlock)
	- Removed RegRead from ToggleUI()
	- SpinLock() nolonger calls ToggleUI()
	- Minor code cleanup

	- Tweaked QuickLaunch function
	- Fixed WindowReverseWait() infinite waiting state
	- Reduced latency of SpinLock() to 500ms

	- Updated CAB to include latest MortScript 4.3.b15
	- Fixed bug in SelectToday() that prevents a blank Background Today screen

2.7.5.areal: Initial Release
Attached Files
File Type: cab UIFlex - - [Click for QR Code] (278.9 KB, 494 views)
File Type: cab UIFlex - - [Click for QR Code] (279.6 KB, 115 views)
File Type: cab UIFlex - - [Click for QR Code] (280.3 KB, 223 views)
File Type: pdf UIFlex.pdf - [Click for QR Code] (71.7 KB, 533 views)
File Type: cab UIFlex - - [Click for QR Code] (280.7 KB, 466 views)
File Type: cab UIFlex - - [Click for QR Code] (280.9 KB, 500 views)
The Following 5 Users Say Thank You to arealityfarbetween For This Useful Post: [ View ] Gift arealityfarbetween Ad-Free
2nd December 2010, 06:46 PM |#2  
OP Senior Member
Flag Newcastle upon Tyne
Thanks Meter: 71
Donate to Me
The Cancel button doesn't always cancel!
In some of the dialogs of the UIFlex menu you'll notice that the "Cancel" button does not work as you might expect:
  • Once you have selected the plugins for your Background Today screen, "Cancel" saves your changes.
  • If you need to re-write a QuickLaunch script and then press "Cancel" you will be asked if you wish to rewrite all of your QuickLaunch scripts in the main program directory.

Translations needed!
Some translations are missing! Please help by providing the required translations in your language. This is not such a hard job, I reduced the number of messages produced by the script significantly and have cleared the lines which are no longer needed.

In addition, translation is done within the application now! Once you've made a complete translation just grab the "custom.txt" from inside the language directory and you can post it as "YourLanguage.txt" in the thread

Program Icon
The icon could perhaps do with a change but cyber-junkie said it's OK to use the existing one and I'm happy with that!
Anyone who wants to create an icon go right ahead, because he also showed me how to change it if we want to, and we'll put it to a vote.
3rd December 2010, 02:38 AM |#3  
Thanks Meter: 2
great work!
4th December 2010, 12:29 AM |#4  
true2you's Avatar
Senior Member
Flag brussels
Thanks Meter: 9
error: empty variable name not allowed

line23 (/program files/uiflex/uiflex_gui.mscr):
Lang = @LanguageSense()


my winMo is wwe and sense is in french
i use cht 2.0.0
4th December 2010, 12:54 AM |#5  
nisalatp's Avatar
Senior Member
Flag Kandy
Thanks Meter: 1
Donate to Me
I confirm the error
Originally Posted by true2you

error: empty variable name not allowed

line23 (/program files/uiflex/uiflex_gui.mscr):
Lang = @LanguageSense()


my winMo is wwe and sense is in french
i use cht 2.0.0

Yes, the error is there. ! please correct and advice us what to-do to go around.
4th December 2010, 04:08 PM |#6  
Thanks Meter: 2
Originally Posted by nisalatp

Yes, the error is there. ! please correct and advice us what to-do to go around.

me too. i use the Energy 21916 sense2.5 cookie2.0 GTX Nov27 rom. WM is WWE and supports Chinese.
4th December 2010, 05:10 PM |#7  
Senior Member
Thanks Meter: 3
installed cab on touch pro 2.

when runing program from program list, it gives error saying no app ascociated with uiflex_gui. run the application first then open this file.

what gives?
4th December 2010, 07:06 PM |#8  
OP Senior Member
Flag Newcastle upon Tyne
Thanks Meter: 71
Donate to Me
@loueber: The trouble for you is that you don't have mortscript installed on your device. I've updated the cab on post #1 to include it, just download and install over the top.

@everyone else: I think it's a similar issue that you're experiencing with the GUI, unfortunately if the "@" format of calling subroutines doesn't work with your Mortscript then pretty much the entire program will fail.

Try installing the updated cab and see if you can get into the GUI but I haven't been able to reproduce the Line 23 issue so I'm not sure if that will resolve the problem.

You might want to try setting the registry value "[HKEY_CURRENT_USER]\Software\UIFlex\Language" to e.g. "English" if the issue persists after you install the new cab.

Cheers guys...
4th December 2010, 08:31 PM |#9  
Senior Member
Thanks Meter: 3
new version freezes my phone
uh oh.. well the mortscript version works.... but
for some reason running the program practically freezes my TP2... as if the cpu is running at 100% it takes minutes to open or close or do anything once the program closes manila.

so, i tried uninstalling it but upon reboot i get error message that says
"the file uiflex canot be opened. either not signed or one of its components can not be found. if the problem persists try reinstaling"

and now manila wont start.

this happend after i uninstalled the program.

can you give detailed instructions on what i must do to get my phone back to what it was before i tried the program?
i would really appreciate it
5th December 2010, 12:26 PM |#10  
OP Senior Member
Flag Newcastle upon Tyne
Thanks Meter: 71
Donate to Me
The program only flips registry switches and kills off the ui program. I've seen the problem where Sense won't start sometimes, in totally unrelated situations to UIFlex.

Generally, if sense won't start-uncheck it in today settings, then reboot and re-enable and it should work.

You'll want to remove the link from \windows\startup to stop the error message about uiflex being missing.

EDIT: I've been working a bit on it today because I noticed that QuickLaunchers probably weren't functioning well without the support of the background script, especially for e.g. apps which chainlaunch or apps that are slow to load. This should now be fixed if you noticed it.

The file attached also has the latency reduced which will result in the UI taking marginally longer to start after you quit your program but should help quite a bit for people having trouble with the program taking up too many CPU cycles (that's you, loueber ). I took a quick look at the CPU usage of the program, doesn't seem too bad although I will try and optimise where I can.

Do you guys want control over the script timings? The background script and the SpinLock() are set at 5 seconds and half a second respectively which seems to work nicely on my device (during testing this afternoon) but the option would let you try different timings and you can all report what's best?

Just dump the new file into the program directory, overwriting the existing one.

Cheers guys.
Attached Files
File Type: zip - [Click for QR Code] (6.3 KB, 49 views)
6th December 2010, 04:15 PM |#11  
Thanks Meter: 2
as i have noticed before, the problem still does exist. "i want to add a program to the list. but SPWOS can't close it after opening it so that i can't add it. btw, the program is a loader which launchs a navigator program and configures some parameters for it."
why UIFlex need to open the added program and then close it for adding it to the list? is it possible to discard this manner?
Post Reply Subscribe to Thread

htc sense, ram, spb mobile shell, spwos, startprogwosense

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes