You are not logged in.

spysonic

Trainee

  • "spysonic" is male
  • "spysonic" started this thread

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

1

Tuesday, July 22nd 2014, 9:36am

Scan/Detect all pictures in a folder?

hi everyone,

This is my second time posting some weird questions in Jabaco forum.
before anything else.. please 4give me f my english is not that good :)

i cant seems to find any answers for detecting any pictures in a certain folder. I wanted to have a simple form with a combo box. Upon starting the application It would Detect all the picture inside the folder and display the names in the dropdown. is that possible.. please I need help.
.
.
Spare me, im new to Programming

spysonic

Trainee

  • "spysonic" is male
  • "spysonic" started this thread

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

2

Monday, July 28th 2014, 8:13am

how am i gonna start my experiments with skins & background settings :(. I have no idea..
.
.
Spare me, im new to Programming

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

3

Monday, July 28th 2014, 10:01am

Hey there,

i cant seems to find any answers for detecting any pictures in a certain folder. I wanted to have a simple form with a combo box. Upon starting the application It would Detect all the picture inside the folder and display the names in the dropdown. is that possible.. please I need help.


have a look here:

https://code.google.com/p/jabacoframewor…ileListBox.jsrc

... and I suggest digging the framework for inspiration...


Dani

spysonic

Trainee

  • "spysonic" is male
  • "spysonic" started this thread

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

4

Monday, July 28th 2014, 10:38am

WHOAAA!! Awesome

Thank you very much DANI for pointing me to the framework..
Amazing.. it can detect all th files in my projects directory.
my only problem now is to limit the detection to a certain file. like for example instead of detecting all files perhaps it should only detect PICTURES files with .bmp, jpg or png extensions.

thanks a lot.
spysonic has attached the following image:
  • detecting files (Copy).jpg
.
.
Spare me, im new to Programming

This post has been edited 1 times, last edit by "spysonic" (Jul 28th 2014, 10:44am)


spysonic

Trainee

  • "spysonic" is male
  • "spysonic" started this thread

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

5

Monday, July 28th 2014, 10:47am

by the way HOW do i post the code here? i tried several times but after submitting the reply the code structure gets displayed in lines as in like a paragraph
.
.
Spare me, im new to Programming

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

6

Monday, July 28th 2014, 2:18pm

Quoted

my only problem now is to limit the detection to a certain file. like for example instead of detecting all files perhaps it should only detect PICTURES files with .bmp, jpg or png extensions.


again:

https://code.google.com/p/jabacoframewor…ileListBox.jsrc
does

Jabaco Source

1
Dim myPattern As String = "*.*"


not work for you!?

by the way HOW do i post the code here? i tried several times but after submitting the reply the code structure gets displayed in lines as in like a paragraph


<JBC> button !!


Dani


EDIT: fixed broken link

This post has been edited 1 times, last edit by "Dani" (Jul 30th 2014, 3:22pm)


spysonic

Trainee

  • "spysonic" is male
  • "spysonic" started this thread

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

7

Wednesday, July 30th 2014, 2:30am

Your my sensei Dani.. :)..

unfortunately, I'v already tried adding extension file like "*.jpg" on this code

Jabaco Source

1
Dim myPattern As String = "*.*"

Doesnt solve the problem of displaying the desired file with filtered extension... im still experimenting.

my target out put was to just display the files in my folder with the .bmp, .jpg and .png extension.

thanks for your patience sensei :).
.
.
Spare me, im new to Programming

spysonic

Trainee

  • "spysonic" is male
  • "spysonic" started this thread

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

8

Wednesday, July 30th 2014, 2:41am

and the links you provided me is no longer available..

it redirects me to error 404 (not found)!!1 :(
.
.
Spare me, im new to Programming

This post has been edited 1 times, last edit by "spysonic" (Jul 30th 2014, 3:08am)


spysonic

Trainee

  • "spysonic" is male
  • "spysonic" started this thread

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

9

Wednesday, July 30th 2014, 2:57am

Id like to filter the type of file being handled by myItem

Jabaco Source

1
myItem = myList(i).getName()
.. using the right(string, length) function

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
For i = 0 To Ubound(myList)
myItem = myList(i).getName()
filetype = Right (myItem,3)
 If (myList(i).isFile()=True) Then
 IF (NOT (myHidden=False AND myList(i).isHidden() = True)) Then
 If filetype = "png" Then: List1.AddItem(myList(i).getName())
 If filetype = "jpg" Then: List1.AddItem(myList(i).getName())
 If filetype = "bmp" Then: List1.AddItem(myList(i).getName())
 End If
 End If
Next


forgive my workaround im new to programming!! :D IT WORKS though.
it only displays files having .png, .jpg & .bmp
.
.
Spare me, im new to Programming

This post has been edited 3 times, last edit by "spysonic" (Jul 30th 2014, 3:07am)


spysonic

Trainee

  • "spysonic" is male
  • "spysonic" started this thread

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

10

Wednesday, July 30th 2014, 3:10am

Now i can continue my experiments... in line with designs, skins and themes :D

thanks for the Help Dani. very much.
.
.
Spare me, im new to Programming

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

11

Wednesday, July 30th 2014, 3:18pm

Hey there,

I just looked at it !
The sortout for pattern is actually missing in the framework.

But theuserbl mentioned that it is only a rough implementation of a FileListBox

So here comes my attempt to a pttern-sort-logic:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Private Sub Update_Filename_List()
   Me.Clear()
   Dim myFile As New java#io#File(myDirectory)
   Dim myList = myFile.listFiles
   Dim i, x As Integer
   Dim tmpString As java#lang#String
   Dim tmpPos As Integer  
   Dim tmpExt As String
   Dim tmpPat() As String
   
   tmpPat() = Split(myPattern,",")

   For i = 0 To Ubound(myList)
      If (myList(i).isFile()= True) Then
         IF (NOT (myHidden=False AND myList(i).isHidden() = True)) Then
            If myPattern = "*.*" Then 
               Me.AddItem(myList(i).getName())
            Else
               tmpString = myList(i).getName()
               tmpPos = tmpString.lastIndexOf(".")
               If tmpPos > 0 Then
                  tmpExt = "*" & tmpString.substring(tmpPos).toLowerCase()
                  For x = 0 To Ubound(tmpPat())
                     If tmpExt = tmpPat(x) Then Me.AddItem(myList(i).getName())
                  Next x
               End If
            End If
         End If
      End If
      DoEvents
   Next i
End Sub


You can set the pattern like this:

Jabaco Source

1
File1.Pattern = "*.txt,*.html"


Remember, this is referring to:

https://code.google.com/p/jabacoframewor…ileListBox.jsrc

I might move it to the framework.


Dani

spysonic

Trainee

  • "spysonic" is male
  • "spysonic" started this thread

Posts: 88

Date of registration: Jul 11th 2014

About me: A beginner programmer.

Location: ...Jabaco Academy

Occupation: i have some but still not enough...

Hobbies: Jabaco

  • Send private message

12

Thursday, July 31st 2014, 2:03am

Amazing!

i couldnt ask for more... :thumbsup:
Thanks a lot dani.. your d best.!
.
.
Spare me, im new to Programming

Rate this thread
WoltLab Burning Board