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

Search This thread

arealityfarbetween

Senior Member
Nov 7, 2008
422
71
Newcastle upon Tyne
TfJ


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.

Screenshot
TfI


License
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 2.7.9.3
Enjoy!

Appreciate my work?



Changelog
Code:
2.7.9.3:
        - Fix synax error, missing comma.

2.7.9.2:
	- Re-enabled setup wizard on first run
	- Minor tweak to background script

2.7.9.1:
	- 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

2.7.9:	
	- 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

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

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

2.7.6:	
	- 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
 

Attachments

  • UIFlex.pdf
    71.7 KB · Views: 540
Last edited:

arealityfarbetween

Senior Member
Nov 7, 2008
422
71
Newcastle upon Tyne
Notes

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! :D
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.
 
Last edited:

true2you

Senior Member
Dec 21, 2007
257
12
brussels
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
 

nisalatp

Senior Member
Sep 28, 2008
111
1
Kandy
I confirm the error

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.
 

loueber

Senior Member
Nov 24, 2008
129
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?
 

arealityfarbetween

Senior Member
Nov 7, 2008
422
71
Newcastle upon Tyne
@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... :eek:
 

loueber

Senior Member
Nov 24, 2008
129
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
 

arealityfarbetween

Senior Member
Nov 7, 2008
422
71
Newcastle upon Tyne
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.
 

Attachments

  • UIFlex_functions.mscr.zip
    6.3 KB · Views: 53
Last edited:

blueeagle

Senior Member
Nov 5, 2008
70
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?
 

loueber

Senior Member
Nov 24, 2008
129
3
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.



.

great, i followed yoru link in your original thread to properly uninstall it.

I will now try the new version and let you know of any issues.


thanks
 

arealityfarbetween

Senior Member
Nov 7, 2008
422
71
Newcastle upon Tyne
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?

The reason is in the question ;) It's in case you add a program which chainloads to another exe file-so that the background script/QuickLaunch picks up the correct exe to watch out for instead of the loader which usually terminates afterwards.

Post a full rar this time (not just the two exe files) and I'll be able to take a look at that NaviOne program and it's loader for you. In the meantime, add NaviOne.exe to HKCU\Software\UIFlex\List as a value and it should work, or alternatively select NaviOne.exe when you're adding the program to the list and it also should get the right program.

@elektrik2001: Only noticed your post before I skipped out for work. To use, go into the GUI program and then if you want the background program to run you can "activate auto-start" then just add whatever program you want to be run without HTC Sense/SPB/whatever to the list and when you run that program the script will kill the UI for you within a max of 5 seconds. You can also set a quicklauncher which will disable the UI before you run the program. Once you're finished using your memory hungry app the script will then re-enable the UI.

Cheers.

EDIT: @blueeagle: I've just done a quick test on that xLauncher.exe program on my device. When it runs, it just runs any exe in the same directory as it's in doesn't it? I've been unable to test with NaviOne.exe as it needs a DLL i don't have but I tried it with screencapture, suitor and regedit. Each time it picks up the chainloaded exe file just fine. You aren't pressing any keys after it runs the program are you?-the only other possible cause is if NaviOne.exe takes more than 10 seconds to start-as the script checks the exe on the active window after a ten second delay.

Like I said, post a complete archive of the directory for the program you're having trouble with and I'll take another look.
 
Last edited:

blueeagle

Senior Member
Nov 5, 2008
70
2
the xLoader.exe launches the exe files in the directories which are designated in line 2 and line 15 in the xLoader.ini. the result didn't change no matter whether i pressed something or not. i attached all the dll files here. but the remainder files is too huge to upload.
i have changed the cityguide.exe to xLoader.exe in HKCU\Software\UIFlex\List, and it works fine. when i launch xLoader the sense is closed and when xLoader quits the sense is loaded.
but how can i add xLoader to quicklaunch list?
 

Attachments

  • DLLs.rar
    2.2 MB · Views: 11

arealityfarbetween

Senior Member
Nov 7, 2008
422
71
Newcastle upon Tyne
Does the program not work ok if you use NaviOne.exe as the monitored program and select it as the exe instead of xLoader?

Can you direct me somplace where I can download the full NaviOne program? I'll also need a copy of tinyGPS too. I've searched but can't find either anywhere on the web apart from an obscure mention in a motorolla forum.

I'm doing some script updates this weekend and will add the function to set a custom background monitor and QuickLaunch entry.

In the meantime, please try this attached function file when adding xLoader.exe and post the output.

Cheers.

EDIT: To the guys and gals downloading the attached file. It's ONLY needed if you're having trouble with adding programs; specifically, when you try to add a program as a QuickLaunch or to the background monitor if it doesn't close after ten seconds please post the output from the message window that pops up, it's not for release and has no extra functionality from what's in the cab!
 

Attachments

  • UIFlex_functions.zip
    6.6 KB · Views: 14
Last edited:

blueeagle

Senior Member
Nov 5, 2008
70
2
if i add navione.exe to the list, when navione is launched it works ok. but i need to use xLoader to configure it.
you can download navione program here: http://ode.careland.com.cn/jspscript/download1astep.jsp?mode=1&type=ppc&model=DopodS900
its official site home page is: www.careland.com.cn
navione program is named 凯立德 in chinese or KLD for short.
as for tinygps, i attach it here
i used your new attached file to overwrite the old one, but it didn't work yet. it was the same as before, and moreover when the exe file you added to the list is launched the sense isn't closed.
i think just discard the recent manner of adding exe to list, at least giving us the option, may be a good choice
 

Attachments

  • TINYGPS.rar
    5.8 MB · Views: 29
  • Like
Reactions: arealityfarbetween

arealityfarbetween

Senior Member
Nov 7, 2008
422
71
Newcastle upon Tyne
Ok, so if navione.exe is added to the list, does sense not close when it's run with xloader.exe?

I didn't expect the function file I uploaded to fix the problem. I can't reproduce the bug so I put a trace in there to show a message when the exe is tested before it tries to kill off the process. It should have shown a message window with a number and the exe in it?

I'm not going to discard the current behaviour because it works for everything I've tried, even xLoader.exe works fine for me: If you place xLoader.exe and it's ini file in a directory with any exe file (apart from this one case) it'll run that app and ExeTest() has no problem killing the program, try it :) I did 3 tests with three different programs so it can't be a fluke.

I will add the option but I need to know what's going wrong with the testing routine because as far as I can see the function is flawless. Please post the output.
 

blueeagle

Senior Member
Nov 5, 2008
70
2
if navione.exe is added to the list, sense will close when it's run with xloader.exe.
yes, a message window is shown, but only with number 3, no exe. do you set the limit number to 2? or maybe the problem is related to tinygps.exe because it has a 5s delay to be lanuched? i remove the tinygps item in the xLoader.ini so that xLoader only launches one exe(navione.exe). then xLoader can be opened and closed and automatically added to the list rightly. but the feedback isn't the same as adding other exe. the "quicklaunch is auto added" isn't shown and just a blank screen with yes and no in the bottom is shown. then i pressed the "yes". i don't remember the specific case. the feedback would be like this.
 
Last edited:

arealityfarbetween

Senior Member
Nov 7, 2008
422
71
Newcastle upon Tyne
Alright, so here goes:

It's too late to do up a changelog, I gotta leave the house in a few minutes but I've been working on this all day.

So, the one flaw with ExeTest(), the 10 second delay. Is now gone, there's a change in behaviour though so translators will be needed for the other language files apart from English.

Basically, now when you add a program:
1) When it is fully launched, exit it normally.
2) If more than one process was found, the script will ask you which process you want to wait for's exit before re-enabling sense.

There's a few other things, this should fix any problems with devices becoming unresponsive after running a program that the script is watching out for and hopefully be a bit nicer to memory since only the bare functions are loaded by the background script...

Although, the script is pretty stable, it's still a little rough round the edges, the 2.7 version is a development release for 3.0, so any feedback/experiences you have with it are of course welcome! Once I get some translations back I can start preparing for it.

Just replace the files in the program directory currently, and the English.txt goes into language of course. You might need to go into the advanced menu and factory reset but only if you have any trouble, I don't think there will be many.

Enjoy!

EDIT: 3 downloads, no replies. Either it's working good or you're the silent types that don't complain! ;)

I was reading here and thought you guys might find it useful? Do you want a button in the start menu which just hides manila temporarily? Because I think UIFlex can do it better (infact, it already does-but only when you launch a monitored app)

Any thoughts?
 

Attachments

  • UIFlex.zip
    13.2 KB · Views: 18
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    TfJ


    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.

    Screenshot
    TfI


    License
    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 2.7.9.3
    Enjoy!

    Appreciate my work?



    Changelog
    Code:
    2.7.9.3:
            - Fix synax error, missing comma.
    
    2.7.9.2:
    	- Re-enabled setup wizard on first run
    	- Minor tweak to background script
    
    2.7.9.1:
    	- 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
    
    2.7.9:	
    	- 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
    
    2.7.8:	
    	- Included control of script timings (main and spinlock)
    	- Removed RegRead from ToggleUI()
    	- SpinLock() nolonger calls ToggleUI()
    	- Minor code cleanup
    
    2.7.7:	
    	- Tweaked QuickLaunch function
    	- Fixed WindowReverseWait() infinite waiting state
    	- Reduced latency of SpinLock() to 500ms
    
    2.7.6:	
    	- 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
    2
    you're right, I don't mind at all :) cheers!
    2
    @Szczepanik: Good idea, that should work just fine with UIFlex, but you'll need to set it up as a quick link to make sure sense is closed just before running clrcad & then haret. I don't think there'll be any problems after rebooting into wm but I haven't tried that scenario myself so YMMV.

    Cheers!
    1
    if i add navione.exe to the list, when navione is launched it works ok. but i need to use xLoader to configure it.
    you can download navione program here: http://ode.careland.com.cn/jspscript/download1astep.jsp?mode=1&type=ppc&model=DopodS900
    its official site home page is: www.careland.com.cn
    navione program is named 凯立德 in chinese or KLD for short.
    as for tinygps, i attach it here
    i used your new attached file to overwrite the old one, but it didn't work yet. it was the same as before, and moreover when the exe file you added to the list is launched the sense isn't closed.
    i think just discard the recent manner of adding exe to list, at least giving us the option, may be a good choice
    1
    This is a great app! just what i was looking for! if you dont mind may i add this to my saving ram thread? (ill include a link to this thread)
    cheers!