We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small Basic Only Extension
#27
LitDev,

I did find that Desktop.SetWallPaper doesn't work the way that it should even using the LDBasic commands. Here is a snippet of the code:

LDBasic.FixFlickr()
For image = 1 to 5
pic = Flickr.GetRandomPicture("landscape")
'wall=LDBasic.LoadImage(pic)
LDBasic.DownloadFile("c:\temp\test.jpg",pic)
'TextWindow.WriteLine(wall)
Desktop.SetWallPaper("c:\temp\test.jpg")
Program.Delay(10000)
EndFor

If I use LDBasic.LoadImage it doesn't change the wallpaper at all. Using download file it will change it one time. This code came from the "Small Basic Curriculum for the desktop object. I really don't understand why LDBasic.LoadImage doesn't work. Your thoughts? Is there something we need to add?

Here is the original program from the tutorial:

LDBasic.FixFlickr()
For image = 1 to 5
pic = Flickr.GetRandomPicture("landscape")
Desktop.SetWallPaper(pic)
Program.Delay(10000)
EndFor

I did get the multiple images to work with this: The LDBasic.LoadImage still mystifies me as to why it doesn't.

LDBasic.FixFlickr()
For image = 1 to 5
pic = Flickr.GetRandomPicture("landscape")
'TextWindow.WriteLine(pic)
Temp="c:\temp\test"+image+".jpg"
ldbasic.DownloadFile(Temp,pic)
'wall=ldbasic.LoadImage(pic)
'File.DeleteFile(temp)
TextWindow.WriteLine(temp)
Desktop.SetWallPaper(temp)
File.DeleteFile(temp)
Program.Delay(10000)
EndFor

JR
[-] The following 1 user Likes jrmrhrb00's post:
  • litdev
Reply


Messages In This Thread
Small Basic Only Extension - by jrmrhrb00 - 11-02-2023, 06:09 PM
RE: Small Basic Only Extension - by litdev - 11-03-2023, 07:39 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-04-2023, 02:00 PM
RE: Small Basic Only Extension - by litdev - 11-05-2023, 02:49 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-05-2023, 03:42 PM
RE: Small Basic Only Extension - by litdev - 11-05-2023, 08:58 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 01:13 AM
RE: Small Basic Only Extension - by litdev - 11-06-2023, 09:13 AM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 02:04 PM
RE: Small Basic Only Extension - by litdev - 11-06-2023, 03:15 PM
RE: Small Basic Only Extension - by Scout - 11-06-2023, 03:17 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 03:39 PM
RE: Small Basic Only Extension - by litdev - 11-06-2023, 06:32 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 08:21 PM
RE: Small Basic Only Extension - by litdev - 11-06-2023, 09:11 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 09:42 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-07-2023, 02:32 PM
RE: Small Basic Only Extension - by litdev - 11-07-2023, 05:49 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-07-2023, 06:35 PM
RE: Small Basic Only Extension - by litdev - 11-07-2023, 10:32 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-07-2023, 11:00 PM
RE: Small Basic Only Extension - by litdev - 11-08-2023, 12:07 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-08-2023, 03:00 PM
RE: Small Basic Only Extension - by litdev - 11-08-2023, 08:10 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-08-2023, 08:44 PM
RE: Small Basic Only Extension - by WhTurner - 11-09-2023, 01:13 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-10-2023, 04:37 PM
RE: Small Basic Only Extension - by litdev - 11-10-2023, 07:31 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 12-19-2023, 02:46 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)