Pointui » Home 2 Applets Showcase

[Tool] Pro Tweak - Easy Custom

(235 posts)
  • Started 1 year ago by Montecristoff
  • Latest reply from ken29
  1. Hi all,

    Want to go further in Pointui Customization?



    Pro Tweak will be here to help you!

    This thread contains all you have to know to customize your Home 2 Pro version.

    [29 may 2009] ABCDEFGabcdefg have done a very good tool to help all Pro users!!!


      Custom CS Generator is here...


      This great tool allow you to easily configure actions and events on your Home 2 screen.
      Choose control, choose action and generate your own custom.cs file.
      Once done, just copy it in your Home folder (\Program Files\Home2).

    _____________________________

    Some usual paths...

    Pointui Home 2 screens

      Contacts:
      ScreenContacts contacts;
      FlowStack.Branch(contacts);

      Running apps:
      ScreenRunningApps RunningApps;
      FlowStack.Branch(RunningApps);

      Programs:
      ScreenPrograms Programs;
      FlowStack.Branch(Programs);

      Settings:
      ScreenSettings Settings;
      FlowStack.Branch(Settings);

      Customize:
      ScreenCustomize Customize;
      FlowStack.Branch(Customize);

    Windows Mobile screens
      Contacts:
      ProcessStart("poutlook.exe", "contacts");

      New Contact:
      ProcessStart("poutlook.exe", "contacts -new");

      Calendar:
      ProcessStart("poutlook.exe", "calendar"); //default view

      ProcessStart("poutlook.exe", "calendar -va"); //agenda

      ProcessStart("poutlook.exe", "calendar -vd"); //day view

      ProcessStart("poutlook.exe", "calendar -vw"); //week view

      ProcessStart("poutlook.exe", "calendar -vm"); //month view

      ProcessStart("poutlook.exe", "calendar -vy"); //year view

      ProcessStart("poutlook.exe", "calendar -vl");

      New appointment:
      ProcessStart("poutlook.exe", "calendar -new");

      Tasks:
      ProcessStart("poutlook.exe", "tasks");

      New appointment:
      ProcessStart("poutlook.exe", "tasks -new");

      Messaging:
      ProcessStart("tmail.exe");

      Specific email account:
      ProcessStart("tmail.exe", "-service "SpecificEmailAccountName"");

      SMS/MMS:
      ProcessStart("tmail.exe", "-service "SMS"");

      New SMS:
      ProcessStart("tmail.exe", "-service "SMS" -to");

      File Explorer:
      ProcessStart("fexplore.exe");

      Phone:
      ProcessStart("cprog.exe");

    _____________________________

    Pro tweak is open... to you!

    Attachments

    1. ProTweak_mini_icon.png (1.7 KB, 116 downloads) 1 year old
    2. CustomCSGenerator.Beta1.007.png (159.1 KB, 421 downloads) 1 year old
    3. CustomCSGenerator.png (156.4 KB, 74 downloads) 1 year old
    4. ProTweak_icon.png (3.8 KB, 372 downloads) 1 year old
    5. ProTweak.png (5.3 KB, 728 downloads) 1 year old
    Posted 1 year ago #
  2. strages
    Member

    first :)

    mmh nice!, more customisation is always nice,, but couldnt this be better done in the cutomisation options screen? Yes this saves memory but is a little inconvenient isnt it?

    tx though ! :)

    Posted 1 year ago #
  3. Here is a bit more info about the Custom.cs file...


    //This class provides the ability to provide an alternate event handler for certain home screen events.
    //Return true if you handle the event and the default processing should not occur.
    class ScreenHome_CustomHandlers
    {
    bool ScreenHome_AfterLoad(ScreenHome screen)
    {
    return false;
    }
    //----------------------------------------------
    bool btnPhone_OnClick(ScreenHome screen, Control sender, int x, int y)
    {
    return false;
    }
    bool btnMessaging_OnClick(ScreenHome screen, Control sender, int x, int y)
    {
    return false;
    }
    bool btnFavContacts_OnClick(ScreenHome screen, Control sender, int x, int y)
    {
    return false;
    }
    bool btnFavApps_OnClick(ScreenHome screen, Control sender, int x, int y)
    {
    return false;
    }
    bool SoftKeyButtonClick(ScreenHome screen, String buttonID)
    {
    return false;
    }
    bool btnTitle_OnClick(ScreenHome screen, Control sender, int x, int y)
    {
    return false;
    }
    //----------------------------------------------
    bool AnimateOut(ScreenHome screen)
    {
    return false;
    }
    bool PositionOffscreen(ScreenHome screen)
    {
    return false;
    }
    bool AnimateToPositions(ScreenHome screen)
    {
    return false;
    }
    }

    ScreenHome_AfterLoad - allows you to initialize things differently for the home screen - for instance you may want to hide the title bar that has the date/time on it by doing screen.title.SetVisible(false);

    btnPhone_OnClick, btnFavContacts_OnClick, btnFavContacts_OnClick, btnFavApps_OnClick - basically just an easy way to override what happens when you click the 4 primary nav buttons - you can change them to load/do whatever you want, of course make sure you return true if so default processing doesn't occur.

    SoftKeyButtonClick - do something different for clicks of soft key buttons.

    btnTitle_OnClick - same as buttons.

    AnimateOut, PositionOffscreen, AnimateToPositions - these are a bit more complicated but allow you to control the home screen animations and positioning of controls.

    An important concept you need to understand is that any code you may have written or used in an applet has been restricted - it can only affect things within the applet context because each applet runs in it's own script context and does not have access to the main application script context. However, with Pro, this Custom.cs file allows you to inject code into the main script context and therefore is why you can be changing things on the home screen.

    A few properties of the main screen:
    AppletRibbon arRibbon;
    AppletIndicator aiIndicator;
    Button btnPhone, btnMessaging, btnFavApps, btnFavContacts;
    Button btnSearch;
    HomeScreenTitle title;

    You could also do things like redefine screens - but we will need to provide more info about this in the future as there is a bit to it, not in the implementation but in what's possible. As an example, maybe you don't like the way our screen works that allows you to browse files, so you want to change it - well currently the screen is defined:


    class ScreenPrograms : FileExplorerScreen
    {
    //....etc etc
    }

    So you could add a class in your Custom.cs by the same name and build in different functionality, so that everywhere in the app that the list of programs is shown such as picking apps for the favorite apps screen - it will now show your custom screen.

    Posted 1 year ago #
  4. ganzee
    Member

    Thanks Monte. This will hopefully satisfy those who do not have the developer skills themselves.

    Posted 1 year ago #
  5. So cute !
    After create the custom file ...

    Attachments

    1. Screenshot.jpg (17.9 KB, 38 downloads) 1 year old
    Posted 1 year ago #
  6. s@ndy
    Member

    Hey Monte stay focused, we are still waiting for your WWHToday homelets !

    Posted 1 year ago #
  7. sinofthegod
    Member

    soft-keys and animations customization!! at last!

    Posted 1 year ago #
  8. costp
    Member

    Ah lol Monte ! Like always, I was thinking about something like that ...

    Bon je vais peut-ĂȘte d'abord terminer Panoramizer...

    Regards,

    Posted 1 year ago #
  9. For sure costp ;)

    It's Pointui effect.
    Always something to do
    Always something to think
    Always something to imagine
    Pointui community is the real reflect of Pointui Spirit...

    Home is your Home, Community built.

    A lot of work to do
    A lot of projects to achieve
    With you, you and you
    TOGETHER
    Welcome in Home adventures!
    Pointui is freedom
    Acid for WM
    All of us are ready for the revolution

    (this is just a little night thought, sorry ;) )

    Posted 1 year ago #
  10. itouch24
    Member

    until this is released.. how would u get bookmarks to look at your opera bookmarks instead of internet explorer?

    Posted 1 year ago #
  11. WerzilUK
    Member

  12. PhiBee
    Member

    Mmm...
    I wish I understand the way you all think !! :p
    Maybe I'm too old !
    So I'll wait you results and take what could be usefull fot me !

    Thank you to all the great developers over here !

    Posted 1 year ago #
  13. J.R. phx
    Member

    @ Joel

    This is excellent, but is there a way to change the click-and-hold functions of the four primary buttons? I tried using btn<button>_OnClickHold() functions but they don't seem to work...

    I set the btnMessaging_OnClick to do a Messages.DisplayInbox("SMS"), exactly what I was wanting from that other thread =)

    Posted 1 year ago #
  14. Hi J.R. phx, you can do that - we only made available the click methods in the way shown above to make it easy to override. However, it's probably even easier to do it the hard way :)

    What you need to do is in the ScreenHome_AfterLoad method - just set the click hold handler for the button you want:


    bool ScreenHome_AfterLoad(ScreenHome screen)
    {
    screen.btnMessaging.OnClickHold = btnMessaging_OnClickHold;
    return false;
    }
    void btnMessaging_OnClickHold(Control sender, int x, int y)
    {
    //do your click hold stuff here
    }

    You can also leave the existing click-hold handler untouched as in the case of the phone button by just adding your handler as an additional one using "+=":


    screen.btnPhone.OnClickHold += btnPhone_OnClickHold;

    (so in this case, the default handler will do it's thing as well as yours - although this could cause some problems if they started fighting)

    Posted 1 year ago #
  15. J.R. phx
    Member

    Awesome Joel - thanks, worked like a charm!

    One more noob scripting question - is there a way in scripting to get the on/off status of Pro's built-in auto-lock, and/or flip the status?

    Posted 1 year ago #
  16. Sort of, see here:
    http://docs.pointui.com/Device#void_Lock.28.29

    You can lock the device and see if it's locked. But it's up to the OS on how it gets unlocked and there are no APIs to allow you to do that programatically.

    Posted 1 year ago #
  17. FightingTux
    Member

    I have two problems with the custom.cs...

    1) OnClick does not work for the title! (maybe I did something wrong?)
    No matter if i set
    screen.title.OnClick = btnTitle_OnClick;
    in ScreenHome_AfterLoad or not!

    Here is my custom.cs:
    class ScreenHome_CustomHandlers
    {
    bool ScreenHome_AfterLoad(ScreenHome screen)
    {
    return false;
    }
    bool btnTitle_OnClick(ScreenHome screen, Control sender, int x, int y)
    {
    ScreenContacts contacts;
    FlowStack.Branch(contacts);
    return false;
    }
    }

    2)And it does not work to set an OnClick handler to an image loaded in the custom.cs, too! :(
    (Image will load but the OnClick does not work...)

    Posted 1 year ago #
  18. Hi FightingTux, not sure off top of my head but I bet the title control does not accept input - try calling screen.title.SetTabStop(true); within ScreenHome_AfterLoad().

    Posted 1 year ago #
  19. FightingTux
    Member

    Thanks Joel!
    It works with screen.title.SetTabStop(true)! :)
    This solution works for both of my problems...

    Posted 1 year ago #
  20. ler329
    Member

    This is what I'd like to do, but not sure how to write a custom.cs file....

    - change "press & hold" functions of four main buttons which would point to exe commands;

    - change soft key "all contacts" to my own contact app

    - remove top title bar with time/ and date.

    Could anyone offer suggestions to get me started?

    Posted 1 year ago #
  21. NorrinRadd
    Member

    Is there any way to invoke the Screen, "ScreenRunningApps" when in another app outside Home2, like in 1.5 when clicking the Start Menu area? Thanks!

    Posted 1 year ago #
  22. efendi
    Member

    I'm gonna be frustrated!
    What i want:
    - right Softkey: change Bookmarks to Contacts
    - remove the top title bar

    at first i created a custom.cs with the code from post 1.
    this one works perfect (i have "contacts)
    then i added a new code to custom.cs to remove the top title bar
    this code works perfect, too
    BUD now the right softkey is changed back to Bookmarks

    here is my custom.cs:
    class ScreenHome_CustomHandlers
    {
    bool ScreenHome_AfterLoad(ScreenHome screen)
    {
    //change the right soft key
    screen.SetSoftKeys("Menu", Terms.Get("Menu"), "Contacts", Terms.Get("Contacts"));
    return false;
    }
    bool SoftKeyButtonClick(ScreenHome screen, String buttonID)
    {
    //what do we want to do on the right soft key?
    if (buttonID == "Contacts")
    {
    //show the contacts screen
    ScreenContacts contacts;
    FlowStack.Branch(contacts);
    }
    return false;
    }
    bool ScreenHome_AfterLoad(ScreenHome screen)
    {
    //remove the top title bar
    screen.title.SetVisible(false);
    }
    }

    what's my fault
    please help me

    Posted 1 year ago #
  23. FightingTux
    Member

    You overload the ScreenHome_AfterLoad at the bottom of the code!
    class ScreenHome_CustomHandlers
    {
    bool ScreenHome_AfterLoad(ScreenHome screen)
    {
    //change the right soft key
    screen.SetSoftKeys("Menu", Terms.Get("Menu"), "Contacts", Terms.Get("Contacts"));
    screen.title.SetVisible(false);
    return false;
    }
    bool SoftKeyButtonClick(ScreenHome screen, String buttonID)
    {
    //what do we want to do on the right soft key?
    if (buttonID == "Contacts")
    {
    //show the contacts screen
    ScreenContacts contacts;
    FlowStack.Branch(contacts);
    }
    return false;
    }
    }

    Something like that should work!

    Posted 1 year ago #
  24. efendi
    Member

    Hi FightingTux!
    I tried your correction and now it works perfect!
    Thanks a lot!

    Posted 1 year ago #
  25. How can you just remove the time and date or just one of them without removing the title.bar?

    Posted 1 year ago #
  26. scorpius7589
    Member

    Can't wait for this to come out. I don't know enough about coding to make my own custom.cs

    Posted 1 year ago #
  27. ler329
    Member

    Hi efendi

    Could you upload the custom.cs file to share with us? And Also instructions where to put file, etc.

    With you changing the right soft key to Contacts...is there a way to choose the path for the exe command??

    Thanks
    Lee

    Posted 1 year ago #
  28. efendi
    Member

    Hi Lee,
    here is the file. You only have to put this file into the home2 folder and restart Home!

    Posted 1 year ago #
  29. efendi
    Member

    Hi Lee,
    here is the file. You only have to put this file (change custom.cs.txt to custom.cs) into the home2 folder and restart Home!

    Attachments

    1. Custom.cs.txt (0.7 KB, 190 downloads) 1 year old
    Posted 1 year ago #
  30. ler329
    Member

    Thanks efendi, it did the trick!!

    Since I'm not a coder and don't want to screw anything up....how would I get the right soft key to open "Internal Storage/Program File/Iconsoft/Phonex.exe", instead of the Hom2 contacts??

    Thanks
    lee

    Posted 1 year ago #

RSS feed for this topic

Reply »

You must log in to post.